Leave the Metal view active on the window when recreating the Metal renderer

Fixes https://github.com/libsdl-org/SDL/issues/5140

Also move the metal tag definition to SDL_syswm.h so it can be used by applications
This commit is contained in:
Sam Lantinga 2022-01-07 12:37:28 -08:00
parent 88ac517df0
commit 4b38d4c96b
6 changed files with 55 additions and 10 deletions

View file

@ -98,6 +98,10 @@ typedef struct _UIViewController UIViewController;
typedef Uint32 GLuint;
#endif
#if defined(SDL_VIDEO_VULKAN) || defined(SDL_VIDEO_METAL)
#define SDL_METALVIEW_TAG 255
#endif
#if defined(SDL_VIDEO_DRIVER_ANDROID)
typedef struct ANativeWindow ANativeWindow;
typedef void *EGLSurface;