Does anyone here use ZSNES with DirectFB? If you don't know, DirectFB is Linux software that supports direct framebuffer video. This is important for the Matrox G400 Dual Head and similar cards because this allows you to use the second head for TV output (this is for my Freevo box).
My friend got a patch (from where I don't know) that modifies ZSNES to work with DirectFB. The TV output works great, but the keyboard is totally unusable. To configure my game pad I compiled a version without the patch, ran ZSNES in X to configure, and then recompiled with the patch so ZSNES would use the existing configuration file. Game pad works great, but I really would like to use the keyboard to do state saves and whatnot. Another side effect of this patch is that games don't seem to save properly (i.e., saving a game from within the game doesn't work). This works just fine if the patch is not used.
I pasted the link to my friend's site as well as the code contained in the patch. From what I can tell, those few lines of code messes up keyboard usage and saving. Does anyone use DirectFB without these crazy side effects? Does this patch code look correct to the developers?
http://freevo.webalias.com/snes.html
Code: Select all
diff -u -r zsnes-1.36/src/linux/sw_draw.c zsnes/src/linux/sw_draw.c
--- zsnes-1.36/src/linux/sw_draw.c 2002-07-07 04:03:16.000000000 +0200
+++ zsnes/src/linux/sw_draw.c 2003-09-28 19:15:03.000000000 +0200
@@ -117,7 +122,7 @@
SurfBufD = (DWORD) surface->pixels;
LockSurface();
- ClearWin16();
+// ClearWin16();
UnlockSurface();
}
diff -u -r zsnes-1.36/src/video/sw_draw.asm zsnes/src/video/sw_draw.asm
--- zsnes-1.36/src/video/sw_draw.asm 2002-05-27 22:03:42.000000000 +0200
+++ zsnes/src/video/sw_draw.asm 2003-09-28 19:12:28.000000000 +0200
@@ -35,13 +35,13 @@
.Blank2:
mov ecx, [SurfaceX]
rep stosw
- mov edx, [SurfaceX]
- add edi, [pitch]
- shl edx,1
- add ebx,1
- sub edi,edx
- cmp ebx, [SurfaceY]
- jne .Blank2
+; mov edx, [SurfaceX]
+; add edi, [pitch]
+; shl edx,1
+; add ebx,1
+; sub edi,edx
+; cmp ebx, [SurfaceY]
+; jne .Blank2
popad
ret