|
发表于 2003-10-19 08:46:53
|
显示全部楼层
需要patch gxmame
[code:1]
--- src/gxmame.h.orig 2003-09-21 13:00:00.000000000 -0500
+++ src/gxmame.h 2003-09-21 13:39:33.220657471 -0500
@@ -645,6 +645,7 @@
gboolean list_mixer_plugins; /* list mixer plugins */
gboolean keyboard_leds; /* use keyboard leds */
gboolean dirty; /* dirty not in 0.61 pr1 */
+ gboolean newx11modeusage; /* for 0.72.1 -x11-mode changes */
gboolean xvext; /* xv extension 0.60 + patch from
Alastair M. Robinson*/
gboolean vidix; /* another target from Alastair M. Robinson
--- src/mameio.c.orig 2003-09-21 13:00:45.000000000 -0500
+++ src/mameio.c 2003-09-21 13:03:07.000000000 -0500
@@ -956,9 +956,14 @@
for (p=opt;(*p && (*p++ != ' ')););
version=atof(p);
g_free(opt);
+
+ /* version 0.72.1 introduces new syntax for the -x11-mode option */
+ if (version>=0.72)
+ available_options.newx11modeusage=TRUE;
/* do not test anymore if the executable is valid since its already tested previously */
/* to be able to load the 0.68 options */
+
if (version==0.68)
opt=g_strdup_printf("%s -showusage -noloadconfig 2>/dev/null",real_mame_executable);
else
@@ -989,7 +994,17 @@
available_options.list_mixer_plugins = FALSE;
available_options.keyboard_leds = FALSE;
available_options.dirty = FALSE;
- available_options.xvext = FALSE;
+/* available_options.xvext = FALSE; */
+ if (version>=0.72)
+ {
+ available_options.xvext=TRUE;
+ available_options.fullscreen=TRUE;
+ }
+ else
+ {
+ available_options.xvext = FALSE;
+ available_options.fullscreen = FALSE;
+ }
available_options.vidix = FALSE;
available_options.yuv = FALSE;
available_options.yv12 = FALSE;
@@ -999,7 +1014,7 @@
available_options.x11joyname = FALSE;
available_options.joydevname = FALSE;
available_options.video_mode = FALSE;
- available_options.fullscreen = FALSE;
+/* available_options.fullscreen = FALSE; */
available_options.cfgname = FALSE;
available_options.grabmouse = FALSE;
available_options.grabkeyboard = FALSE;
--- src/options.c.orig 2003-09-21 13:03:18.000000000 -0500
+++ src/options.c 2003-09-21 14:00:12.360568312 -0500
@@ -34,6 +34,7 @@
#include <gtk/gtk.h>
#include "gxmame.h"
+#include "mameio.h"
#include "options.h"
#include "io.h"
#include "callbacks.h"
@@ -6267,7 +6268,8 @@
*vidix=NULL,
*geometry = NULL,
*newext = NULL;
-
+ int x11mode = 0;
+
if (available_options.mitshm)
{
mitshm = g_strdup_printf("-%smitshm",(target->mitshm)?"":"no");
@@ -6276,7 +6278,22 @@
/* put the new extention option (xv and vidix) in a string*/
if (target->xvgeom_flag && strcmp(target->geometry,""))
geometry = g_strdup_printf("-geometry %s",target->geometry);
- newext = g_strdup_printf("%s " /* fullscreen */
+/* newext = g_strdup_printf("%s " fullscreen */
+ /* 0.72 removes -fullscreen option in favour of new */
+ /* -x11-mode values */
+ if (available_options.newx11modeusage)
+ {
+ newext = g_strdup_printf("%s " /* geometry */
+ "%s " /* yuv */
+ "%s", /* yv12 */
+ geometry?geometry:"",
+ available_options.yuv?((target->yuv)?"-yuv":"-noyuv"):"",
+ available_options.yv12?((target->yv12)?"-yv12":"-noyv12"):""
+ );
+ }
+ else
+ {
+ newext = g_strdup_printf("%s " /* fullscreen */
"%s " /* geometry */
"%s " /* yuv */
"%s", /* yv12 */
@@ -6285,7 +6302,8 @@
available_options.yuv?((target->yuv)?"-yuv":"-noyuv"):"",
available_options.yv12?((target->yv12)?"-yv12":"-noyv12"):""
);
-
+ }
+
if (available_options.xvext)
{
if (target->mitshm)
@@ -6305,6 +6323,46 @@
Video_Mode_option = create_Video_Mode_Related_options_string();
+
+ /* 0.72 introduces new usage of -x11-mode: */
+ /* 0 = normal windowed */
+ /* 1 = DGA fullscreen */
+ /* 2 = Xv windowed */
+ /* 3 = Xv fullscreen */
+ if (available_options.newx11modeusage)
+ {
+ x11mode=target->x11_mode;
+ if (target->xvext)
+ {
+ x11mode=2;
+ if (target->xvfullscreen)
+ x11mode=3;
+ }
+
+ option_string = g_strdup_printf ("-x11-mode %i "
+ "-%scursor "
+ "%s " /* mitshm */
+ "%s " /* xvext */
+ "%s " /* newext */
+ "-%sxsync "
+ "-%sprivatecmap "
+ "-%sxil "
+ "-%smtxil "
+ "%s ", /* Video mode */
+ x11mode,
+ (target->cursor)?"":"no",
+ mitshm?mitshm:"",
+ vidix?vidix:"",
+ newext?newext:"",
+ (target->xsync)?"":"no",
+ (target->privatecmap)?"":"no",
+ (target->xil)?"":"no",
+ (target->mtxil)?"":"no",
+ Video_Mode_option?Video_Mode_option:""
+ );
+ }
+ else
+ {
option_string = g_strdup_printf ("-x11-mode %i "
"-%scursor "
"%s " /* mitshm */
@@ -6328,6 +6386,7 @@
(target->mtxil)?"":"no",
Video_Mode_option?Video_Mode_option:""
);
+ }
g_free(Video_Mode_option);
g_free(xvext);
g_free(vidix);
@@ -6555,8 +6555,8 @@
"-%sanalogstick "
"%s " /* joy */
"-%smouse "
- "-%shotrod "
- "-%shotrodse "
+ "%s "
+ "%s "
"-%susbpspad "
"-%srapidfire "
"%s " /* trackball1 */
@@ -6571,8 +6571,8 @@
(target->analogstick)?"":"no",
joy?joy:"",
(target->mouse)?"":"no",
- (target->hotrod)?"":"no",
- (target->hotrodse)?"":"no",
+ (target->hotrod)?"-ctrlr HotRod":"",
+ (target->hotrodse)?"-ctrlr HotRodSE":"",
(target->usbpspad)?"":"no",
(target->rapidfire)?"":"no",
trackball1?trackball1:"",
[/code:1] |
|