diff --git a/desmume/src/gtk-glade/desmume.c b/desmume/src/gtk-glade/desmume.c index 69ee920f5..3ef81f9ac 100755 --- a/desmume/src/gtk-glade/desmume.c +++ b/desmume/src/gtk-glade/desmume.c @@ -26,6 +26,7 @@ gboolean EmuLoop(gpointer data); static BOOL regMainLoop = FALSE; +static BOOL noticed_3D=FALSE; volatile BOOL execute = FALSE; BOOL click = FALSE; BOOL fini = FALSE; @@ -54,6 +55,7 @@ void desmume_free() int desmume_open(const char *filename) { int i; + noticed_3D=attempted_3D_op=FALSE; clear_savestates(); i = NDS_LoadROM(filename, savetype, savesize); return i; @@ -81,6 +83,7 @@ void desmume_resume() void desmume_reset() { + noticed_3D=attempted_3D_op=FALSE; NDS_Reset(); desmume_resume(); } @@ -118,7 +121,12 @@ static void Draw() gboolean EmuLoop(gpointer data) { int i; - + if (!noticed_3D && attempted_3D_op) { + GtkWidget * dlg = glade_xml_get_widget(xml, "w3Dop"); + gtk_widget_show(dlg); + noticed_3D=TRUE; + } + if(desmume_running()) /* Si on est en train d'executer le programme ... */ { fps_FrameCount += Frameskip + 1; diff --git a/desmume/src/gtk-glade/gdk_gl.c b/desmume/src/gtk-glade/gdk_gl.c index 4088c21c1..a61937e5b 100755 --- a/desmume/src/gtk-glade/gdk_gl.c +++ b/desmume/src/gtk-glade/gdk_gl.c @@ -232,13 +232,6 @@ gboolean screen (GtkWidget * widget, int viewportscreen) { float bright_color = 0.0f; // blend with black float bright_alpha = 0.0f; // don't blend struct _MASTER_BRIGHT * mBright; - static BOOL noticed_3D=FALSE; - - if (!noticed_3D && attempted_3D_op) { - GtkWidget * dlg = glade_xml_get_widget(xml, "w3Dop"); - gtk_widget_show(dlg); - noticed_3D=TRUE; - } // we take care to draw the right thing the right place // we need to rearrange widgets not to use this trick