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

DanM dan at milkcarton.com
Sun Feb 23 12:28:12 EST 2003


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 --------------
? mamehandler.patch
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	23 Feb 2003 21:21:03 -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,29 @@
             *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 ) {
+          if (!strcmp(general_prefs.show_disclaimer,"FALSE"))
+            *exec+= " -skip_disclaimer";
+          else
+            *exec+= " -noskip_disclaimer";
+
+          if (!strcmp(general_prefs.show_gameinfo,"FALSE"))
+            *exec+= " -skip_gameinfo";
+          else
+            *exec+= " -noskip_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 +863,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 = gContext->GetSetting("MameShowDisclaimer");
+    general_prefs.show_gameinfo = 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	23 Feb 2003 21:21:04 -0000
@@ -30,6 +30,9 @@
     int xmame_release;
     int romdir_time;
 
+    QString show_disclaimer;
+    QString show_gameinfo;
+
     QString rom_url;
     QString screenshot_url;
     QString flyer_url;


More information about the mythtv-dev mailing list