mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-07 07:00:48 +00:00
win32: Make leaving fullscreen when the window already isn't fullscreen a no-op
Otherwise, the styling on external windows may end up being overridden.
This commit is contained in:
parent
8f79e0b7f8
commit
69ec0322d3
1 changed files with 7 additions and 0 deletions
|
|
@ -1083,6 +1083,13 @@ int WIN_SetWindowFullscreen(SDL_VideoDevice *_this, SDL_Window *window, SDL_Vide
|
|||
SDL_Log("WIN_SetWindowFullscreen: %d", (int)fullscreen);
|
||||
#endif
|
||||
|
||||
/* Early out if already not in fullscreen, or the styling on
|
||||
* external windows may end up being overridden.
|
||||
*/
|
||||
if (!(window->flags & SDL_WINDOW_FULLSCREEN) && !fullscreen) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (SDL_ShouldAllowTopmost() && (window->flags & SDL_WINDOW_ALWAYS_ON_TOP)) {
|
||||
top = HWND_TOPMOST;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue