mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-21 17:21:44 +00:00
macOS: fix initial Metal drawable size in certain multi-display setups
(cherry picked from commit baca26d727
)
This commit is contained in:

committed by
Sam Lantinga

parent
8800d40442
commit
17ecb11ed6
@@ -94,7 +94,7 @@ SDL_MetalViewEventWatch(void *userdata, SDL_Event *event)
|
|||||||
|
|
||||||
[self updateDrawableSize];
|
[self updateDrawableSize];
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,6 +151,9 @@ Cocoa_Metal_CreateView(_THIS, SDL_Window * window)
|
|||||||
|
|
||||||
[view addSubview:newview];
|
[view addSubview:newview];
|
||||||
|
|
||||||
|
/* Make sure the drawable size is up to date after attaching the view. */
|
||||||
|
[newview updateDrawableSize];
|
||||||
|
|
||||||
metalview = (SDL_MetalView)CFBridgingRetain(newview);
|
metalview = (SDL_MetalView)CFBridgingRetain(newview);
|
||||||
|
|
||||||
return metalview;
|
return metalview;
|
||||||
|
Reference in New Issue
Block a user