diff --git a/desmume/src/gtk/cheatsGTK.cpp b/desmume/src/gtk/cheatsGTK.cpp index 8ead580ad..8e6816c72 100644 --- a/desmume/src/gtk/cheatsGTK.cpp +++ b/desmume/src/gtk/cheatsGTK.cpp @@ -266,7 +266,6 @@ static GtkWidget *cheat_list_create_ui() void CheatList () { -#ifdef DESMUME_GTK_CHEATS_BROKEN shouldBeRunning = desmume_running(); Pause(); win = gtk_window_new(GTK_WINDOW_TOPLEVEL); @@ -277,9 +276,6 @@ void CheatList () cheat_list_create_ui(); gtk_widget_show_all(win); -#else - printf("cheats in gtk are broken currently\n"); -#endif } diff --git a/desmume/src/gtk/main.cpp b/desmume/src/gtk/main.cpp index 15c55161f..070ccc46c 100644 --- a/desmume/src/gtk/main.cpp +++ b/desmume/src/gtk/main.cpp @@ -192,10 +192,12 @@ static const char *ui_description = " " " " " " +#ifdef DESMUME_GTK_CHEAT_BROKEN " " " " " " " " +#endif " " " " " " @@ -262,9 +264,11 @@ static const GtkActionEntry action_entries[] = { { "reset", "gtk-refresh", "Re_set", NULL, NULL, Reset }, { "FrameskipMenu", NULL, "_Frameskip" }, { "LayersMenu", NULL, "_Layers" }, +#ifdef DESMUME_GTK_CHEAT_BROKEN { "CheatMenu", NULL, "_Cheat" }, { "cheatsearch", NULL, "_Search", NULL, NULL, CheatSearch }, { "cheatlist", NULL, "_List", NULL, NULL, CheatList }, +#endif { "ConfigMenu", NULL, "_Config" }, { "ConfigSaveMenu", NULL, "_Saves" }, @@ -578,8 +582,10 @@ static int Open(const char *filename, const char *cflash_disk_image) { int res; res = NDS_LoadROM( filename, cflash_disk_image ); +#ifdef DESMUME_GTK_CHEAT_BROKEN if(res > 0) gtk_action_set_sensitive(gtk_action_group_get_action(action_group, "cheatlist"), TRUE); +#endif return res; } @@ -1834,8 +1840,10 @@ common_gtk_main( struct configured_features *my_config) gtk_action_set_sensitive(gtk_action_group_get_action(action_group, "run"), FALSE); gtk_action_set_sensitive(gtk_action_group_get_action(action_group, "reset"), FALSE); gtk_action_set_sensitive(gtk_action_group_get_action(action_group, "printscreen"), FALSE); +#ifdef DESMUME_GTK_CHEAT_BROKEN gtk_action_set_sensitive(gtk_action_group_get_action(action_group, "cheatlist"), FALSE); gtk_action_set_sensitive(gtk_action_group_get_action(action_group, "cheatsearch"), FALSE); +#endif gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);