diff --git a/SDL2pp/Window.cc b/SDL2pp/Window.cc index ab9b621..534ffa8 100644 --- a/SDL2pp/Window.cc +++ b/SDL2pp/Window.cc @@ -144,7 +144,7 @@ Window& Window::SetFullscreen(Uint32 flags) { Window& Window::ToggleFullscreen() { 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) throw Exception("SDL_SetWindowFullscreen"); return *this;