MacOS: Added hint to control update of the metal layer's drawable size (#14053)
This commit is contained in:
@@ -90,7 +90,9 @@ static bool SDLCALL SDL_MetalViewEventWatch(void *userdata, SDL_Event *event)
|
||||
|
||||
self.layer.opaque = opaque;
|
||||
|
||||
SDL_AddWindowEventWatch(SDL_WINDOW_EVENT_WATCH_EARLY, SDL_MetalViewEventWatch, (__bridge void *)(self));
|
||||
if (SDL_GetHintBoolean(SDL_HINT_VIDEO_METAL_AUTO_RESIZE_DRAWABLE, true)) {
|
||||
SDL_AddWindowEventWatch(SDL_WINDOW_EVENT_WATCH_EARLY, SDL_MetalViewEventWatch, (__bridge void *)(self));
|
||||
}
|
||||
|
||||
[self updateDrawableSize];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user