mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-24 00:15:40 +00:00
Fixed bug 3202 - Fix renderer visibility on a window maximized directly from the minimized state
Many thanks to id.zeta for details on the bug, and for the fix!
This commit is contained in:
parent
faed05850e
commit
9e9ef5ad31
|
@ -127,6 +127,7 @@ SDL_SendWindowEvent(SDL_Window * window, Uint8 windowevent, int data1,
|
||||||
if (window->flags & SDL_WINDOW_MINIMIZED) {
|
if (window->flags & SDL_WINDOW_MINIMIZED) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
window->flags &= ~SDL_WINDOW_MAXIMIZED;
|
||||||
window->flags |= SDL_WINDOW_MINIMIZED;
|
window->flags |= SDL_WINDOW_MINIMIZED;
|
||||||
SDL_OnWindowMinimized(window);
|
SDL_OnWindowMinimized(window);
|
||||||
break;
|
break;
|
||||||
|
@ -134,6 +135,7 @@ SDL_SendWindowEvent(SDL_Window * window, Uint8 windowevent, int data1,
|
||||||
if (window->flags & SDL_WINDOW_MAXIMIZED) {
|
if (window->flags & SDL_WINDOW_MAXIMIZED) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
window->flags &= ~SDL_WINDOW_MINIMIZED;
|
||||||
window->flags |= SDL_WINDOW_MAXIMIZED;
|
window->flags |= SDL_WINDOW_MAXIMIZED;
|
||||||
break;
|
break;
|
||||||
case SDL_WINDOWEVENT_RESTORED:
|
case SDL_WINDOWEVENT_RESTORED:
|
||||||
|
|
|
@ -158,7 +158,8 @@ SDL_RendererEventWatch(void *userdata, SDL_Event *event)
|
||||||
}
|
}
|
||||||
} else if (event->window.event == SDL_WINDOWEVENT_MINIMIZED) {
|
} else if (event->window.event == SDL_WINDOWEVENT_MINIMIZED) {
|
||||||
renderer->hidden = SDL_TRUE;
|
renderer->hidden = SDL_TRUE;
|
||||||
} else if (event->window.event == SDL_WINDOWEVENT_RESTORED) {
|
} else if (event->window.event == SDL_WINDOWEVENT_RESTORED ||
|
||||||
|
event->window.event == SDL_WINDOWEVENT_MAXIMIZED) {
|
||||||
if (!(SDL_GetWindowFlags(window) & SDL_WINDOW_HIDDEN)) {
|
if (!(SDL_GetWindowFlags(window) & SDL_WINDOW_HIDDEN)) {
|
||||||
renderer->hidden = SDL_FALSE;
|
renderer->hidden = SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue