[mythtv] *UPDATED* PATCH: mythmame to handle new skip_disclamier and skip_gameinfo option

DanM dan at milkcarton.com
Sun Feb 23 15:06:43 EST 2003


I updated my code a bit, cleaned up the if statements to use the more 
compressed form (? : ) Changed show_[gameinfo | disclaimer] to int's.

mythgame-settings.txt  entries are now:
# Choose to show or not to show the disclaimer
int MameShowDisclaimer=0
int MameShowGameInfo=1


DanM wrote:

> Issac,
>  Here's a patch to use the new -skip_disclaimer and -skip_gameinfo in 
> mame .65  I also fixed a but with -nocursor being output when it 
> shouldn't for a SDL build of xmame.
>
> I've added MameShowDisclaimer and MameShowGameInfo to 
> mythgame-settings.txt  of type str. And added them to the prefs 
> struct. If you would like me to make them configurable from another 
> place, let me know.
>
> These three lines will need to be added to mythgame-settings.txt. (I 
> removed the diff entries for them from patch because I didn't want to 
> submit my settings file).
>
> # Choose to show or not to show the disclaimer
> str MameShowDisclaimer=FALSE
> str MameShowGameInfo=FALSE
>
> -dan 

-------------- next part --------------
Index: mythgame/mamehandler.cpp
===================================================================
RCS file: /var/lib/cvs/mythgame/mythgame/mamehandler.cpp,v
retrieving revision 1.11
diff -u -d -r1.11 mamehandler.cpp
--- mythgame/mamehandler.cpp	23 Feb 2003 15:06:31 -0000	1.11
+++ mythgame/mamehandler.cpp	24 Feb 2003 00:00:58 -0000
@@ -408,6 +408,7 @@
         QString exec;
         check_xmame_exe();
         makecmd_line(romdata->Romname(), &exec, static_cast<MameRomInfo*>(romdata));
+         //cout << exec << endl;
         command = popen(exec, "w");
         /* Send a newline to *command in case xmame wants the user to "press any key" */
         fprintf(command, "\n");
@@ -797,8 +798,21 @@
             *exec+= general_prefs.highscore_dir;
           }
         }
-        *exec+= game_settings.fullscreen ? (" -nocursor" + fullscreen) : 
-                windowed;
+
+        /* The .65 builds of mame finally allow you to turn off the disclaimer */
+        /*  and the game info screen.  See if the user wants them off          */
+        if (xmame_minor >= 65 ) {
+            *exec+= general_prefs.show_disclaimer ? " -noskip_disclaimer" : " -skip_disclaimer";
+            *exec+= general_prefs.show_gameinfo ?" -noskip_gameinfo" : " -skip_gameinfo";
+        }
+        /* the nocursor option doesn't apply to SDL builds of xmame */
+        if ( strcmp(general_prefs.xmame_display_target, "SDL")) {
+          *exec+= game_settings.fullscreen ? (" -nocursor" + fullscreen) : 
+                  windowed;
+        }
+        else
+          *exec+= game_settings.fullscreen ? fullscreen : windowed;
+
         *exec+= game_settings.scanlines ? " -scanlines" : " -noscanlines";
         *exec+= game_settings.extra_artwork ? " -artwork" : " -noartwork";
         *exec+= game_settings.autoframeskip ? " -autoframeskip" : " -noautoframeskip";
@@ -841,7 +855,8 @@
     general_prefs.cabinet_dir = gContext->GetSetting("MameCabinetsLocation");
     general_prefs.game_history_file = gContext->GetSetting("MameHistoryLocation");
     general_prefs.cheat_file = gContext->GetSetting("MameCheatLocation");
-
+    general_prefs.show_disclaimer = atoi(gContext->GetSetting("MameShowDisclaimer"));
+    general_prefs.show_gameinfo = atoi(gContext->GetSetting("MameShowGameInfo"));
 }
 
 void MameHandler::SetGameSettings(GameSettings &game_settings, MameRomInfo *rominfo)
Index: mythgame/mametypes.h
===================================================================
RCS file: /var/lib/cvs/mythgame/mythgame/mametypes.h,v
retrieving revision 1.2
diff -u -d -r1.2 mametypes.h
--- mythgame/mametypes.h	23 Feb 2003 15:06:31 -0000	1.2
+++ mythgame/mametypes.h	24 Feb 2003 00:00:59 -0000
@@ -30,6 +30,9 @@
     int xmame_release;
     int romdir_time;
 
+    int show_disclaimer;
+    int show_gameinfo;
+
     QString rom_url;
     QString screenshot_url;
     QString flyer_url;


More information about the mythtv-dev mailing list