|
|
gboolean list_mixer_plugins; /* list mixer plugins */ | gboolean list_mixer_plugins; /* list mixer plugins */ |
gboolean keyboard_leds; /* use keyboard leds */ | gboolean keyboard_leds; /* use keyboard leds */ |
gboolean dirty; /* dirty not in 0.61 pr1 */ | 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 | gboolean xvext; /* xv extension 0.60 + patch from |
Alastair M. Robinson*/ | Alastair M. Robinson*/ |
gboolean vidix; /* another target from Alastair M. Robinson | gboolean vidix; /* another target from Alastair M. Robinson |
|
|
for (p=opt;(*p && (*p++ != ' '));); | for (p=opt;(*p && (*p++ != ' '));); |
version=atof(p); | version=atof(p); |
g_free(opt); | 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 */ | /* do not test anymore if the executable is valid since its already tested previously */ |
/* to be able to load the 0.68 options */ | /* to be able to load the 0.68 options */ |
|
|
if (version==0.68) | if (version==0.68) |
opt=g_strdup_printf("%s -showusage -noloadconfig 2>/dev/null",real_mame_executable); | opt=g_strdup_printf("%s -showusage -noloadconfig 2>/dev/null",real_mame_executable); |
else | else |
|
|
available_options.list_mixer_plugins = FALSE; | available_options.list_mixer_plugins = FALSE; |
available_options.keyboard_leds = FALSE; | available_options.keyboard_leds = FALSE; |
available_options.dirty = 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.vidix = FALSE; |
available_options.yuv = FALSE; | available_options.yuv = FALSE; |
available_options.yv12 = FALSE; | available_options.yv12 = FALSE; |
|
|
available_options.x11joyname = FALSE; | available_options.x11joyname = FALSE; |
available_options.joydevname = FALSE; | available_options.joydevname = FALSE; |
available_options.video_mode = FALSE; | available_options.video_mode = FALSE; |
available_options.fullscreen = FALSE; |
/* available_options.fullscreen = FALSE; */ |
available_options.cfgname = FALSE; | available_options.cfgname = FALSE; |
available_options.grabmouse = FALSE; | available_options.grabmouse = FALSE; |
available_options.grabkeyboard = FALSE; | available_options.grabkeyboard = FALSE; |
|
|
#include <gtk/gtk.h> | #include <gtk/gtk.h> |
| |
#include "gxmame.h" | #include "gxmame.h" |
|
#include "mameio.h" |
#include "options.h" | #include "options.h" |
#include "io.h" | #include "io.h" |
#include "callbacks.h" | #include "callbacks.h" |
|
|
*vidix=NULL, | *vidix=NULL, |
*geometry = NULL, | *geometry = NULL, |
*newext = NULL; | *newext = NULL; |
|
int x11mode = 0; |
|
|
if (available_options.mitshm) | if (available_options.mitshm) |
{ | { |
mitshm = g_strdup_printf("-%smitshm",(target->mitshm)?"":"no"); | mitshm = g_strdup_printf("-%smitshm",(target->mitshm)?"":"no"); |
|
|
/* put the new extention option (xv and vidix) in a string*/ | /* put the new extention option (xv and vidix) in a string*/ |
if (target->xvgeom_flag && strcmp(target->geometry,"")) | if (target->xvgeom_flag && strcmp(target->geometry,"")) |
geometry = g_strdup_printf("-geometry %s",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 " /* geometry */ |
"%s " /* yuv */ | "%s " /* yuv */ |
"%s", /* yv12 */ | "%s", /* yv12 */ |
|
|
available_options.yuv?((target->yuv)?"-yuv":"-noyuv"):"", | available_options.yuv?((target->yuv)?"-yuv":"-noyuv"):"", |
available_options.yv12?((target->yv12)?"-yv12":"-noyv12"):"" | available_options.yv12?((target->yv12)?"-yv12":"-noyv12"):"" |
); | ); |
|
} |
|
|
if (available_options.xvext) | if (available_options.xvext) |
{ | { |
if (target->mitshm) | if (target->mitshm) |
|
|
| |
Video_Mode_option = create_Video_Mode_Related_options_string(); | 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 " | option_string = g_strdup_printf ("-x11-mode %i " |
"-%scursor " | "-%scursor " |
"%s " /* mitshm */ | "%s " /* mitshm */ |
|
|
(target->mtxil)?"":"no", | (target->mtxil)?"":"no", |
Video_Mode_option?Video_Mode_option:"" | Video_Mode_option?Video_Mode_option:"" |
); | ); |
|
} |
g_free(Video_Mode_option); | g_free(Video_Mode_option); |
g_free(xvext); | g_free(xvext); |
g_free(vidix); | g_free(vidix); |