From ebd9df46ec54f38c5d788c8094e21479db3f638c Mon Sep 17 00:00:00 2001 From: BearOso Date: Wed, 11 Sep 2024 14:45:07 -0500 Subject: [PATCH] Gtk: Avoid saving the size while fullscreening occurs. --- gtk/src/gtk_s9xwindow.cpp | 18 +----------------- gtk/src/gtk_s9xwindow.h | 1 - 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/gtk/src/gtk_s9xwindow.cpp b/gtk/src/gtk_s9xwindow.cpp index b7f24684..4c0dafa5 100644 --- a/gtk/src/gtk_s9xwindow.cpp +++ b/gtk/src/gtk_s9xwindow.cpp @@ -543,12 +543,6 @@ bool Snes9xWindow::draw(const Cairo::RefPtr &cr) S9xDisplayRefresh(); - if (!(config->fullscreen)) - { - config->window_width = get_width(); - config->window_height = get_height(); - } - if ((is_paused() || NetPlay.Paused) && (gui_config->splash_image < SPLASH_IMAGE_STARFIELD || gui_config->rom_loaded)) { S9xDeinitUpdate(last_width, last_height); @@ -1159,12 +1153,7 @@ void Snes9xWindow::enter_fullscreen_mode() GdkWindow *gdk_window = window->get_window()->gobj(); config->rom_loaded = 0; - - nfs_width = config->window_width; - nfs_height = config->window_height; - int nfs_x; - int nfs_y; - window->get_position(nfs_x, nfs_y); + config->fullscreen = 1; #ifdef GDK_WINDOWING_X11 if (config->change_display_resolution && GDK_IS_X11_WINDOW(gdk_window)) @@ -1232,10 +1221,8 @@ void Snes9xWindow::enter_fullscreen_mode() 1); } #endif - config->fullscreen = 1; config->rom_loaded = rom_loaded; - /* If we're running a game, disable ui when entering fullscreen */ if (!Settings.Paused && config->rom_loaded) config->ui_visible = false; @@ -1313,9 +1300,6 @@ void Snes9xWindow::leave_fullscreen_mode() } #endif - resize(nfs_width, nfs_height); - window->move(nfs_x, nfs_y); - config->rom_loaded = rom_loaded; config->fullscreen = 0; configure_widgets(); diff --git a/gtk/src/gtk_s9xwindow.h b/gtk/src/gtk_s9xwindow.h index a2b0414d..11738584 100644 --- a/gtk/src/gtk_s9xwindow.h +++ b/gtk/src/gtk_s9xwindow.h @@ -88,7 +88,6 @@ class Snes9xWindow : public GtkBuilderWindow int last_width, last_height; int mouse_region_x, mouse_region_y; int mouse_region_width, mouse_region_height; - int nfs_width, nfs_height, nfs_x, nfs_y; int autovrr_saved_frameskip; int autovrr_saved_sound_input_rate; bool autovrr_saved_sync_to_vblank;