began correcting this error : actions not enabled when loading rom from

command line
This commit is contained in:
damdoum 2007-01-07 12:37:41 +00:00
parent 225c332ba3
commit 7476a02675
3 changed files with 13 additions and 5 deletions

View File

@ -7,6 +7,14 @@ gboolean ScreenGap=FALSE;
/* inline & protos */ /* inline & protos */
void enable_rom_features() {
SET_SENSITIVE("menu_exec", TRUE);
SET_SENSITIVE("menu_pause", TRUE);
SET_SENSITIVE("menu_reset", TRUE);
SET_SENSITIVE("wgt_Exec", TRUE);
SET_SENSITIVE("wgt_Reset", TRUE);
}
void MAINWINDOW_RESIZE() { void MAINWINDOW_RESIZE() {
GtkWidget * spacer1 = glade_xml_get_widget(xml, "misc_sep3"); GtkWidget * spacer1 = glade_xml_get_widget(xml, "misc_sep3");
GtkWidget * spacer2 = glade_xml_get_widget(xml, "misc_sep4"); GtkWidget * spacer2 = glade_xml_get_widget(xml, "misc_sep4");
@ -81,12 +89,8 @@ void file_open() {
gtk_dialog_run(GTK_DIALOG(pDialog)); gtk_dialog_run(GTK_DIALOG(pDialog));
gtk_widget_destroy(pDialog); gtk_widget_destroy(pDialog);
} else { } else {
SET_SENSITIVE("menu_exec", TRUE);
SET_SENSITIVE("menu_pause", TRUE);
SET_SENSITIVE("menu_reset", TRUE);
SET_SENSITIVE("wgt_Exec", TRUE);
SET_SENSITIVE("wgt_Reset", TRUE);
desmume_resume(); desmume_resume();
enable_rom_features();
} }
g_free(sChemin); g_free(sChemin);

View File

@ -31,6 +31,9 @@ GtkWidget * pDrawingArea;
GtkWidget * pDrawingArea2; GtkWidget * pDrawingArea2;
GladeXML * xml, * xml_tools; GladeXML * xml, * xml_tools;
/* callbacks.c */
void enable_rom_features();
/* callbacks_IO.c */ /* callbacks_IO.c */
int ScreenCoeff_Size; int ScreenCoeff_Size;
gboolean ScreenRotate; gboolean ScreenRotate;

View File

@ -158,6 +158,7 @@ int main(int argc, char *argv[]) {
if(commandLine_File) { if(commandLine_File) {
if(desmume_open(commandLine_File) >= 0) { if(desmume_open(commandLine_File) >= 0) {
desmume_resume(); desmume_resume();
enable_rom_features();
} else { } else {
GtkWidget *pDialog = gtk_message_dialog_new(GTK_WINDOW(pWindow), GtkWidget *pDialog = gtk_message_dialog_new(GTK_WINDOW(pWindow),
GTK_DIALOG_MODAL, GTK_DIALOG_MODAL,