gtk: added hard reset option (closes rom/re-opens rom)
gtk: renamed reset to soft reset (resetNes()) gtk: added seperators to emulator menu
This commit is contained in:
parent
107636301b
commit
be05f73b97
|
@ -1,3 +1,4 @@
|
||||||
|
19-mar-2011 - prg318 - gtk - added hard reset option (renamed reset->soft reset)
|
||||||
18-mar-2011 - prg318 - sdl - removed GTK_LITE; --nogui made it obsolete
|
18-mar-2011 - prg318 - sdl - removed GTK_LITE; --nogui made it obsolete
|
||||||
12-feb-2010 - mart0258 - Fix input selection for Famicom Expansion port
|
12-feb-2010 - mart0258 - Fix input selection for Famicom Expansion port
|
||||||
25-jan-2010 - prg318 - gtk - filechooser now remembers last file opened
|
25-jan-2010 - prg318 - gtk - filechooser now remembers last file opened
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
void toggleSound(GtkWidget* check, gpointer data);
|
void toggleSound(GtkWidget* check, gpointer data);
|
||||||
void loadGame ();
|
void loadGame ();
|
||||||
|
void closeGame();
|
||||||
extern Config *g_config;
|
extern Config *g_config;
|
||||||
|
|
||||||
GtkWidget* MainWindow = NULL;
|
GtkWidget* MainWindow = NULL;
|
||||||
|
@ -1119,6 +1119,26 @@ void emuReset ()
|
||||||
ResetNES();
|
ResetNES();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void hardReset ()
|
||||||
|
{
|
||||||
|
if(isloaded)
|
||||||
|
{
|
||||||
|
closeGame();
|
||||||
|
const char* lastFile;
|
||||||
|
g_config->getOption("SDL.LastOpenFile", &lastFile);
|
||||||
|
if(LoadGame(lastFile) == 0)
|
||||||
|
{
|
||||||
|
GtkWidget* d;
|
||||||
|
d = gtk_message_dialog_new(GTK_WINDOW(MainWindow), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
|
||||||
|
"Error opening the ROM file.");
|
||||||
|
gtk_dialog_run(GTK_DIALOG(d));
|
||||||
|
gtk_widget_destroy(d);
|
||||||
|
}
|
||||||
|
resizeGtkWindow();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void enableFullscreen ()
|
void enableFullscreen ()
|
||||||
{
|
{
|
||||||
if(isloaded)
|
if(isloaded)
|
||||||
|
@ -1857,15 +1877,19 @@ static char* menuXml =
|
||||||
" <menu action='EmulatorMenuAction'>"
|
" <menu action='EmulatorMenuAction'>"
|
||||||
" <menuitem action='PowerAction' />"
|
" <menuitem action='PowerAction' />"
|
||||||
" <menuitem action='ResetAction' />"
|
" <menuitem action='ResetAction' />"
|
||||||
|
" <menuitem action='SoftResetAction' />"
|
||||||
" <menuitem action='PauseToggleAction' />"
|
" <menuitem action='PauseToggleAction' />"
|
||||||
|
" <separator />"
|
||||||
|
" <menuitem action='GameGenieToggleAction' />"
|
||||||
|
" <menuitem action='LoadGameGenieAction' />"
|
||||||
|
" <separator />"
|
||||||
|
" <menuitem action='InsertCoinAction' />"
|
||||||
|
" <separator />"
|
||||||
" <menu action='FdsMenuAction'>"
|
" <menu action='FdsMenuAction'>"
|
||||||
" <menuitem action='SwitchDiskAction' />"
|
" <menuitem action='SwitchDiskAction' />"
|
||||||
" <menuitem action='EjectDiskAction' />"
|
" <menuitem action='EjectDiskAction' />"
|
||||||
" <menuitem action='LoadBiosAction' />"
|
" <menuitem action='LoadBiosAction' />"
|
||||||
" </menu>"
|
" </menu>"
|
||||||
" <menuitem action='LoadGameGenieAction' />"
|
|
||||||
" <menuitem action='GameGenieToggleAction' />"
|
|
||||||
" <menuitem action='InsertCoinAction' />"
|
|
||||||
" </menu>"
|
" </menu>"
|
||||||
" <menu action='MovieMenuAction'>"
|
" <menu action='MovieMenuAction'>"
|
||||||
" <menuitem action='OpenMovieAction' />"
|
" <menuitem action='OpenMovieAction' />"
|
||||||
|
@ -1905,7 +1929,8 @@ static GtkActionEntry normal_entries[] = {
|
||||||
|
|
||||||
{"EmulatorMenuAction", NULL, "_Emulator"},
|
{"EmulatorMenuAction", NULL, "_Emulator"},
|
||||||
{"PowerAction", NULL, "P_ower", NULL, NULL, G_CALLBACK(FCEUI_PowerNES)},
|
{"PowerAction", NULL, "P_ower", NULL, NULL, G_CALLBACK(FCEUI_PowerNES)},
|
||||||
{"ResetAction", GTK_STOCK_REFRESH, "_Reset", NULL, NULL, G_CALLBACK(emuReset)},
|
{"SoftResetAction", GTK_STOCK_REFRESH, "_Soft Reset", NULL, NULL, G_CALLBACK(emuReset)},
|
||||||
|
{"ResetAction", GTK_STOCK_REFRESH, "_Reset", NULL, NULL, G_CALLBACK(hardReset)},
|
||||||
{"PauseToggleAction", GTK_STOCK_MEDIA_PAUSE, "_Pause", "Pause", NULL, G_CALLBACK(togglePause)},
|
{"PauseToggleAction", GTK_STOCK_MEDIA_PAUSE, "_Pause", "Pause", NULL, G_CALLBACK(togglePause)},
|
||||||
{"FdsMenuAction", GTK_STOCK_FLOPPY, "_FDS"},
|
{"FdsMenuAction", GTK_STOCK_FLOPPY, "_FDS"},
|
||||||
{"SwitchDiskAction", "go-jump", "_Switch Disk", NULL, NULL, G_CALLBACK(FCEU_FDSSelect)},
|
{"SwitchDiskAction", "go-jump", "_Switch Disk", NULL, NULL, G_CALLBACK(FCEU_FDSSelect)},
|
||||||
|
|
Loading…
Reference in New Issue