Set window dimensions properly when toggling full-screen
This commit is contained in:
parent
48c2a8c5b0
commit
e516861366
3 changed files with 97 additions and 50 deletions
|
|
@ -88,12 +88,7 @@ void SdlInputHandler::handleKeyEvent(SDL_KeyboardEvent* event)
|
|||
else if (event->keysym.sym == SDLK_x) {
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Detected full-screen toggle combo");
|
||||
if (SDL_GetWindowFlags(Session::s_ActiveSession->m_Window) & SDL_WINDOW_FULLSCREEN) {
|
||||
SDL_SetWindowFullscreen(Session::s_ActiveSession->m_Window, 0);
|
||||
}
|
||||
else {
|
||||
SDL_SetWindowFullscreen(Session::s_ActiveSession->m_Window, SDL_WINDOW_FULLSCREEN);
|
||||
}
|
||||
Session::s_ActiveSession->toggleFullscreen();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue