--- src/gxmame.h.orig 2003-09-09 10:51:37.000000000 +0100 +++ src/gxmame.h 2003-09-09 10:52:33.000000000 +0100 @@ -656,6 +656,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-08 22:32:51.000000000 +0100 +++ src/mameio.c 2003-09-09 10:57:44.000000000 +0100 @@ -32,8 +32,6 @@ #include #define BUFFER_SIZE 1000 - - gboolean create_game_list_file(void) { FILE *xmame_pipe=NULL; @@ -957,6 +955,10 @@ 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) @@ -989,7 +991,16 @@ available_options.list_mixer_plugins = FALSE; available_options.keyboard_leds = FALSE; available_options.dirty = 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 +1010,7 @@ available_options.x11joyname = FALSE; available_options.joydevname = FALSE; available_options.video_mode = FALSE; - available_options.fullscreen = FALSE; + available_options.cfgname = FALSE; available_options.grabmouse = FALSE; available_options.grabkeyboard = FALSE; --- src/options.c.orig 2003-09-08 22:41:24.000000000 +0100 +++ src/options.c 2003-09-09 11:01:36.000000000 +0100 @@ -34,6 +34,7 @@ #include #include "gxmame.h" +#include "mameio.h" #include "options.h" #include "io.h" #include "callbacks.h" @@ -7252,6 +7253,7 @@ *vidix=NULL, *geometry = NULL, *newext = NULL; + int x11mode = 0; if (available_options.mitshm) { @@ -7261,7 +7263,21 @@ /* 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 */ + /* 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":"-n oyuv"):"", + available_options.yv12?((target->yv12)?"-yv12":" ;-noyv12"):"" + ); + } + else + { + newext = g_strdup_printf("%s " /* fullscreen */ "%s " /* geometry */ "%s " /* yuv */ "%s", /* yv12 */ @@ -7270,6 +7286,7 @@ available_options.yuv?((target->yuv)?"-yuv":"-n oyuv"):"", available_options.yv12?((target->yv12)?"-yv12":" ;-noyv12"):"" ); + } if (available_options.xvext) { @@ -7289,8 +7306,47 @@ Video_Mode_option = create_Video_Mode_Related_options_string(); - - option_string = g_strdup_printf ("-x11-mode %i " + + /* 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 */ "%s " /* xvext */ @@ -7312,7 +7368,8 @@ (target->xil)?"":"no", (target->mtxil)?"":"no", Video_Mode_option?Video_Mode_option:"" - ); + ); + } g_free(Video_Mode_option); g_free(xvext); g_free(vidix);