GTK: added exceptions for loading roms
This commit is contained in:
parent
1481f6491f
commit
cd2d6c5dc5
|
@ -12,8 +12,8 @@ opts.AddVariables(
|
||||||
BoolVariable('NEWPPU', 'Enable new PPU core', 1),
|
BoolVariable('NEWPPU', 'Enable new PPU core', 1),
|
||||||
BoolVariable('CREATE_AVI', 'Enable avi creation support (SDL only)', 0),
|
BoolVariable('CREATE_AVI', 'Enable avi creation support (SDL only)', 0),
|
||||||
BoolVariable('LOGO', 'Enable a logoscreen when creating avis (SDL only)', '1'),
|
BoolVariable('LOGO', 'Enable a logoscreen when creating avis (SDL only)', '1'),
|
||||||
BoolVariable('GTK', 'Enable GTK2 GUI (SDL only)', 1),
|
BoolVariable('GTK', 'Enable GTK2 GUI (SDL only)', 0),
|
||||||
BoolVariable('GTK_LITE', 'Enable GTK2 for dialogs only', 0)
|
BoolVariable('GTK_LITE', 'Enable GTK2 for dialogs only', 1)
|
||||||
)
|
)
|
||||||
|
|
||||||
env = Environment(options = opts)
|
env = Environment(options = opts)
|
||||||
|
|
|
@ -963,20 +963,19 @@ void loadGame ()
|
||||||
char* filename;
|
char* filename;
|
||||||
|
|
||||||
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (fileChooser));
|
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (fileChooser));
|
||||||
LoadGame(filename);
|
if(LoadGame(filename) == 0)
|
||||||
|
{
|
||||||
|
gtk_widget_destroy (fileChooser);
|
||||||
|
GtkWidget* d;
|
||||||
|
d = gtk_message_dialog_new(GTK_WINDOW(MainWindow), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
|
||||||
|
"Could not open the selected ROM file.");
|
||||||
|
gtk_dialog_run(GTK_DIALOG(d));
|
||||||
|
gtk_widget_destroy(d);
|
||||||
|
}
|
||||||
g_free(filename);
|
g_free(filename);
|
||||||
}
|
}
|
||||||
gtk_widget_destroy (fileChooser);
|
else
|
||||||
|
gtk_widget_destroy (fileChooser);
|
||||||
#ifdef _S9XLUA_H
|
|
||||||
std::string s;
|
|
||||||
g_config->getOption("SDL.LuaRC", &s);
|
|
||||||
if (!s.empty())
|
|
||||||
{
|
|
||||||
FCEU_LoadLuaCode(s.c_str());
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void closeGame() { CloseGame(); }
|
void closeGame() { CloseGame(); }
|
||||||
|
|
Loading…
Reference in New Issue