diff --git a/ui/sdl.c b/ui/sdl.c index e6c9597d37825f266d8f84fe5f8c0818f5b762be..4acfe81867090c762cf186a7f6175bd3e17a8214 100644 --- a/ui/sdl.c +++ b/ui/sdl.c @@ -529,7 +529,8 @@ static void sdl_send_mouse_event(int dx, int dy, int dz, int x, int y, int state static void toggle_full_screen(DisplayState *ds) { gui_fullscreen = !gui_fullscreen; - do_sdl_resize(real_screen->w, real_screen->h, real_screen->format->BitsPerPixel); + do_sdl_resize(ds_get_width(ds), ds_get_height(ds), + ds_get_bits_per_pixel(ds)); if (gui_fullscreen) { scaling_active = 0; gui_saved_grab = gui_grab;