Share

GXMame, GTK XMame Frontend

Tracker: Bugs

5 comptibility with 0.72.1 - ID: 793974
Last Update: Comment added ( anarxia )

xv doesnt work with new xmame. They have changed the
option for using xv. -x11 <0-3> are modes. Could you
please add support for new style selection .


Nobody/Anonymous ( nobody ) - 2003-08-24 06:41

5

Closed

Fixed

Nicos

Interface

None

Public


Comments ( 3 )




Date: 2003-11-18 19:19
Sender: anarxia

Logged In: YES
user_id=143408

Fixed in CVS.


Date: 2003-09-09 10:07
Sender: cowbutt

Logged In: YES
user_id=257968

Here's a rough-n-ready patch for 0.72.1 compatibility. I've
tested it, but it could do with parsing the available
options, rather than just assuming that xv and xv fullscreen
are available if version >=0.72.

--- 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 <unistd.h>
#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 <gtk/gtk.h>

#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":"-noyuv"):"",
+
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":"-noyuv"):"",

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);



Date: 2003-08-31 21:30
Sender: nobody

Logged In: NO

Because of this bug, the MIT Shared Memory and xv extension
checkboxes in the Rendering tab of the Options dialog are
broken.

meldroc@frii.com


Log in to comment.

Attached File

No Files Currently Attached

Changes ( 4 )

Field Old Value Date By
status_id Open 2003-11-18 19:19 anarxia
resolution_id None 2003-11-18 19:19 anarxia
assigned_to nobody 2003-11-18 19:19 anarxia
close_date - 2003-11-18 19:19 anarxia