mirror of https://github.com/snes9xgit/snes9x.git
Fix some idiotic expose handling.
This commit is contained in:
parent
026f9eaa1e
commit
7d95f3732a
|
@ -28,12 +28,6 @@ S9xGTKDisplayDriver::update (int width, int height)
|
|||
c_width = allocation.width;
|
||||
c_height = allocation.height;
|
||||
|
||||
if (width == SIZE_FLAG_DIRTY)
|
||||
{
|
||||
this->clear ();
|
||||
return;
|
||||
}
|
||||
|
||||
if (width <= 0)
|
||||
return;
|
||||
|
||||
|
|
|
@ -722,11 +722,6 @@ S9xOpenGLDisplayDriver::opengl_defaults (void)
|
|||
void
|
||||
S9xOpenGLDisplayDriver::refresh (int width, int height)
|
||||
{
|
||||
if (!config->rom_loaded)
|
||||
{
|
||||
gdk_window_hide (gdk_window);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -556,12 +556,6 @@ S9xXVDisplayDriver::clear (void)
|
|||
void
|
||||
S9xXVDisplayDriver::refresh (int width, int height)
|
||||
{
|
||||
if (!config->rom_loaded)
|
||||
{
|
||||
gdk_window_hide (gdk_window);
|
||||
return;
|
||||
}
|
||||
|
||||
clear ();
|
||||
|
||||
return;
|
||||
|
|
|
@ -921,14 +921,11 @@ Snes9xPreferences::get_settings_from_dialog (void)
|
|||
{
|
||||
S9xReinitDisplay ();
|
||||
}
|
||||
else
|
||||
{
|
||||
S9xDisplayReconfigure ();
|
||||
S9xDisplayRefresh (top_level->last_width, top_level->last_height);
|
||||
|
||||
if (config->rom_loaded)
|
||||
S9xDeinitUpdate (top_level->last_width, top_level->last_height);
|
||||
}
|
||||
S9xDisplayReconfigure ();
|
||||
S9xDisplayRefresh (top_level->last_width, top_level->last_height);
|
||||
|
||||
S9xDeinitUpdate (top_level->last_width, top_level->last_height);
|
||||
|
||||
top_level->configure_widgets ();
|
||||
|
||||
|
|
|
@ -230,8 +230,6 @@ S9xROMLoaded (void)
|
|||
gui_config->rom_loaded = TRUE;
|
||||
top_level->configure_widgets ();
|
||||
|
||||
top_level->last_width = top_level->last_height = SIZE_FLAG_DIRTY;
|
||||
|
||||
if (gui_config->full_screen_on_open)
|
||||
{
|
||||
Settings.Paused = FALSE;
|
||||
|
|
|
@ -671,7 +671,7 @@ extern const gtk_splash_t gtk_splash;
|
|||
void
|
||||
Snes9xWindow::expose (void)
|
||||
{
|
||||
if ((!config->rom_loaded || last_width < 0) && last_width != SIZE_FLAG_DIRTY)
|
||||
if (last_width < 0)
|
||||
{
|
||||
if (!(config->fullscreen) && !(maximized_state))
|
||||
{
|
||||
|
@ -699,28 +699,23 @@ Snes9xWindow::expose (void)
|
|||
((blue & 0xF8) >> 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
S9xDeinitUpdate (last_width, last_height);
|
||||
}
|
||||
else
|
||||
S9xDisplayRefresh (last_width, last_height);
|
||||
|
||||
if (!(config->fullscreen))
|
||||
{
|
||||
if (last_width > 0 || !is_paused ())
|
||||
S9xDisplayRefresh (last_width, last_height);
|
||||
config->window_width = get_width ();
|
||||
config->window_height = get_height ();
|
||||
}
|
||||
|
||||
if (!(config->fullscreen))
|
||||
{
|
||||
config->window_width = get_width ();
|
||||
config->window_height = get_height ();
|
||||
}
|
||||
|
||||
if (is_paused ()
|
||||
if (is_paused ()
|
||||
#ifdef NETPLAY_SUPPORT
|
||||
|| NetPlay.Paused
|
||||
|| NetPlay.Paused
|
||||
#endif
|
||||
)
|
||||
{
|
||||
S9xDeinitUpdate (last_width, last_height);
|
||||
}
|
||||
)
|
||||
{
|
||||
S9xDeinitUpdate (last_width, last_height);
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
@ -10,9 +10,6 @@
|
|||
#include "gtk_s9x.h"
|
||||
#include "gtk_builder_window.h"
|
||||
|
||||
#define SIZE_FLAG_NO_DRAWING -1
|
||||
#define SIZE_FLAG_DIRTY -2
|
||||
|
||||
class Snes9xWindow : public GtkBuilderWindow
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue