diff --git a/SConstruct b/SConstruct index ea661181..1b4de2da 100644 --- a/SConstruct +++ b/SConstruct @@ -12,8 +12,8 @@ opts.AddVariables( BoolVariable('NEWPPU', 'Enable new PPU core', 1), BoolVariable('CREATE_AVI', 'Enable avi creation support (SDL only)', 0), BoolVariable('LOGO', 'Enable a logoscreen when creating avis (SDL only)', '1'), - BoolVariable('GTK', 'Enable GTK2 GUI (SDL only)', 1), - BoolVariable('GTK_LITE', 'Enable GTK2 for dialogs only', 0) + BoolVariable('GTK', 'Enable GTK2 GUI (SDL only)', 0), + BoolVariable('GTK_LITE', 'Enable GTK2 for dialogs only', 1) ) env = Environment(options = opts) diff --git a/src/drivers/sdl/gui.cpp b/src/drivers/sdl/gui.cpp index 9a9f9c26..04a39add 100644 --- a/src/drivers/sdl/gui.cpp +++ b/src/drivers/sdl/gui.cpp @@ -963,20 +963,19 @@ void loadGame () char* filename; 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); } - 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 - + else + gtk_widget_destroy (fileChooser); } void closeGame() { CloseGame(); }