[Wine]allegro win32 directx apps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,
  Has anyone tried to get allegro win32 directx apps running under wine?
I find that for the most part they seem to run, but some insist on using
a non-existing bpp of 24 (should be 32), I've tried hacking the x11 driver
and the direct draw hal code to match bpp 24 with 32 and the allegro app
will run after that (if anyone is interested, attached is a patch for that).
Now the allegro app does not respond to any key press. Anyone have tips on
how to debug this?

--
basic
Index: dlls/ddraw/ddraw/hal.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/ddraw/hal.c,v
retrieving revision 1.12
diff -u -r1.12 hal.c
--- dlls/ddraw/ddraw/hal.c	12 Aug 2004 23:01:04 -0000	1.12
+++ dlls/ddraw/ddraw/hal.c	22 Aug 2004 15:40:54 -0000
@@ -229,7 +229,8 @@
 
 /* let's support HALs that cannot switch depths (XVidMode),
  * these should return dwBPP == 0 for all their resolutions */
-#define BPP_MATCH(dd, bpp) ((!(dd)) || ((dd) == bpp))
+/* Some applications give the wrong depth bit size (24 rather than 32) */
+#define BPP_MATCH(dd, bpp) ((!(dd)) || ((dd) == bpp) || (((dd) == 24) && (bpp == 32)))
 
 /* FIXME: we should try to match the refresh rate too */
 
Index: dlls/x11drv/settings.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/settings.c,v
retrieving revision 1.1
diff -u -r1.1 settings.c
--- dlls/x11drv/settings.c	16 Oct 2003 00:21:42 -0000	1.1
+++ dlls/x11drv/settings.c	22 Aug 2004 15:40:54 -0000
@@ -264,7 +264,8 @@
     {
         if (devmode->dmFields & DM_BITSPERPEL)
         {
-            if (devmode->dmBitsPerPel != dd_modes[i].dwBPP)
+            /* some applications give the wrong depth bit size (24 rather than 32) */
+            if (devmode->dmBitsPerPel != dd_modes[i].dwBPP || devmode->dmBitsPerPel != 24 || dd_modes[i].dwBPP != 32)
                 continue;
         }
         if (devmode->dmFields & DM_PELSWIDTH)

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux