mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-04 03:15:59 -04:00
Update Window.cc
This commit is contained in:
parent
a4164f698e
commit
05c60ad52f
@ -144,7 +144,7 @@ Window& Window::SetFullscreen(Uint32 flags) {
|
|||||||
|
|
||||||
Window& Window::ToggleFullscreen() {
|
Window& Window::ToggleFullscreen() {
|
||||||
Uint32 const fullscreenFlag = SDL_WINDOW_FULLSCREEN | SDL_WINDOW_FULLSCREEN_DESKTOP;
|
Uint32 const fullscreenFlag = SDL_WINDOW_FULLSCREEN | SDL_WINDOW_FULLSCREEN_DESKTOP;
|
||||||
bool const isFullscreen = SDL_GetWindowFlags(mpWindow) & fullscreenFlag;
|
bool const isFullscreen = SDL_GetWindowFlags(window_) & fullscreenFlag;
|
||||||
if (SDL_SetWindowFullscreen(window_, isFullscreen ? SDL_FALSE : SDL_WINDOW_FULLSCREEN_DESKTOP) != 0)
|
if (SDL_SetWindowFullscreen(window_, isFullscreen ? SDL_FALSE : SDL_WINDOW_FULLSCREEN_DESKTOP) != 0)
|
||||||
throw Exception("SDL_SetWindowFullscreen");
|
throw Exception("SDL_SetWindowFullscreen");
|
||||||
return *this;
|
return *this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user