Skip to content

Commit

Permalink
Fixed SDL2 fullscreen toggle.
Browse files Browse the repository at this point in the history
  • Loading branch information
vruppert committed May 30, 2024
1 parent e7e76cf commit 3e8c074
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions bochs/gui/sdl2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,6 @@ void switch_to_fullscreen(void)
bx_gui->toggle_mouse_enable();
}
SDL_GetWindowPosition(window, &saved_x, &saved_y);
SDL_SetWindowSize(window, res_x, res_y);
SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
sdl_fullscreen = SDL_GetWindowSurface(window);
sdl_screen = NULL;
Expand Down Expand Up @@ -630,8 +629,7 @@ void bx_sdl2_gui_c::handle_events(void)
case SDL_WINDOWEVENT:
if (sdl_event.window.event == SDL_WINDOWEVENT_EXPOSED) {
SDL_UpdateWindowSurface(window);
}
if (sdl_event.window.event == SDL_WINDOWEVENT_FOCUS_LOST) {
} else if (sdl_event.window.event == SDL_WINDOWEVENT_FOCUS_LOST) {
DEV_kbd_release_keys();
}
break;
Expand Down

0 comments on commit 3e8c074

Please sign in to comment.