mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-17 15:21:43 +00:00
Fixed the render viewport not updating when the metal view resizes
When the phone is in portrait mode and the window is in landscape mode, the view changes orientation after layoutSubviews runs. In this case we need some way of notifying the application that the Metal view has changed.
This commit is contained in:
@@ -830,7 +830,8 @@ static int SDLCALL SDL_RendererEventWatch(void *userdata, SDL_Event *event)
|
||||
}
|
||||
|
||||
if (event->type == SDL_EVENT_WINDOW_RESIZED ||
|
||||
event->type == SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED) {
|
||||
event->type == SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED ||
|
||||
event->type == SDL_EVENT_WINDOW_METAL_VIEW_RESIZED) {
|
||||
UpdateMainViewDimensions(renderer);
|
||||
UpdateLogicalPresentation(renderer);
|
||||
} else if (event->type == SDL_EVENT_WINDOW_HIDDEN) {
|
||||
|
Reference in New Issue
Block a user