From 7414276a4b1572281b4fc1e3f6ef8892ed6094e7 Mon Sep 17 00:00:00 2001 From: damdoum Date: Sat, 24 Feb 2007 08:49:23 +0000 Subject: [PATCH] msgbox now warns if 3D is used (one time per game / reset) --- desmume/src/gtk-glade/desmume.c | 10 +++++++++- desmume/src/gtk-glade/gdk_gl.c | 7 ------- 2 files changed, 9 insertions(+), 8 deletions(-) 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