Fixed showing and hiding fullscreen windows
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404457
This commit is contained in:
parent
7bf66f3583
commit
db2e29b2d0
2 changed files with 5 additions and 8 deletions
|
@ -182,7 +182,6 @@ struct SDL_VideoDisplay
|
||||||
int num_render_drivers;
|
int num_render_drivers;
|
||||||
SDL_RenderDriver *render_drivers;
|
SDL_RenderDriver *render_drivers;
|
||||||
|
|
||||||
int num_windows;
|
|
||||||
SDL_Window *windows;
|
SDL_Window *windows;
|
||||||
SDL_Window *fullscreen_window;
|
SDL_Window *fullscreen_window;
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ static SDL_VideoDevice *_this = NULL;
|
||||||
SDL_UninitializedVideo(); \
|
SDL_UninitializedVideo(); \
|
||||||
return retval; \
|
return retval; \
|
||||||
} \
|
} \
|
||||||
if (!window || window->magic != &_this->window_magic) { \
|
if (!window || window->magic != &_this->window_magic) { \
|
||||||
SDL_SetError("Invalid window"); \
|
SDL_SetError("Invalid window"); \
|
||||||
return retval; \
|
return retval; \
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ static SDL_VideoDevice *_this = NULL;
|
||||||
SDL_UninitializedVideo(); \
|
SDL_UninitializedVideo(); \
|
||||||
return retval; \
|
return retval; \
|
||||||
} \
|
} \
|
||||||
if (!texture || texture->magic != &_this->texture_magic) { \
|
if (!texture || texture->magic != &_this->texture_magic) { \
|
||||||
SDL_SetError("Invalid texture"); \
|
SDL_SetError("Invalid texture"); \
|
||||||
return retval; \
|
return retval; \
|
||||||
}
|
}
|
||||||
|
@ -772,7 +772,6 @@ static void
|
||||||
SDL_UpdateFullscreenMode(SDL_Window * window, SDL_bool attempt)
|
SDL_UpdateFullscreenMode(SDL_Window * window, SDL_bool attempt)
|
||||||
{
|
{
|
||||||
SDL_VideoDisplay *display = window->display;
|
SDL_VideoDisplay *display = window->display;
|
||||||
int i;
|
|
||||||
|
|
||||||
/* See if we're already processing a window */
|
/* See if we're already processing a window */
|
||||||
if (display->updating_fullscreen) {
|
if (display->updating_fullscreen) {
|
||||||
|
@ -799,8 +798,8 @@ SDL_UpdateFullscreenMode(SDL_Window * window, SDL_bool attempt)
|
||||||
|
|
||||||
if (FULLSCREEN_VISIBLE(window)) {
|
if (FULLSCREEN_VISIBLE(window)) {
|
||||||
/* Hide any other fullscreen windows */
|
/* Hide any other fullscreen windows */
|
||||||
for (i = 0; i < display->num_windows; ++i) {
|
SDL_Window *other;
|
||||||
SDL_Window *other = &display->windows[i];
|
for (other = display->windows; other; other = other->next) {
|
||||||
if (other != window && FULLSCREEN_VISIBLE(other)) {
|
if (other != window && FULLSCREEN_VISIBLE(other)) {
|
||||||
SDL_MinimizeWindow(other);
|
SDL_MinimizeWindow(other);
|
||||||
}
|
}
|
||||||
|
@ -810,8 +809,7 @@ SDL_UpdateFullscreenMode(SDL_Window * window, SDL_bool attempt)
|
||||||
display->updating_fullscreen = SDL_FALSE;
|
display->updating_fullscreen = SDL_FALSE;
|
||||||
|
|
||||||
/* See if there are any fullscreen windows */
|
/* See if there are any fullscreen windows */
|
||||||
for (i = 0; i < display->num_windows; ++i) {
|
for (window = display->windows; window; window = window->next) {
|
||||||
window = &display->windows[i];
|
|
||||||
if (FULLSCREEN_VISIBLE(window)) {
|
if (FULLSCREEN_VISIBLE(window)) {
|
||||||
SDL_DisplayMode fullscreen_mode;
|
SDL_DisplayMode fullscreen_mode;
|
||||||
if (SDL_GetWindowDisplayMode(window, &fullscreen_mode) == 0) {
|
if (SDL_GetWindowDisplayMode(window, &fullscreen_mode) == 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue