Hi,
as I'm using xmame with SDL+DirectFB, I have all the
common arcade video modes in my /etc/fb.modes.
The current approach to find the best video mode is to search for the mode
with the lowest resolution. This is pretty annoying if the exact mode is also
available. Attached is a patch to stop searching if the exact mode is found.
Please CC: comments as I'm not on the list.
Cheers,
Thomas
--- xmame.old/src/unix/video-drivers/SDL.c 2003-09-28 15:12:51.000000000 -0400
+++ xmame/src/unix/video-drivers/SDL.c 2003-11-16 23:44:32.000000000 -0500
@@ -178,6 +178,14 @@
fprintf (stderr, "SDL: Info: Found mode %d x %d\n", cur_width, cur_height);
#endif /* SDL_DEBUG */
+ /* Do we have the perfect mode? */
+ if ((cur_width == visual_width*widthscale) && (cur_height == visual_height*heightscale)) {
+ best_vid_mode = i;
+ best_width = cur_width;
+ best_height = cur_height;
+ break;
+ }
+
/* If width and height too small, skip to next mode */
if ((cur_width < visual_width*widthscale) || (cur_height < visual_height*heightscale)) {
continue;