Hi,
the following patch incorporated in CVS may 3rd has broken BabyGammon (you can get it at http://www.directfichiers.com/babygammon/BAFR100DOGT90.EXE )
With it I have black background instead of the normal backgammon game. If somebody could look at this ...
Mehmet YASAR
Extract from logs : .... 08073078:Call user32.LoadImageA(00400000,0000006a,00000000,00000000,00000000,00002000) ret=00407f17 08073078:Call x11drv.CreateDIBSection(403844f4,403bb334,00000000,00000000,00000000,00000000,00000000) ret=407b4ac2 trace:bitmap:X11DRV_DIB_CreateDIBSection format (114,19), planes 1, bpp 8, size 2204, colors 256 (RGB) 08073078:Call x11drv.GetDeviceCaps(403844f4,0000000c) ret=407b173b 08073078:Ret x11drv.GetDeviceCaps() retval=00000010 ret=407b173b 08073078:Call x11drv.GetDeviceCaps(403844f4,0000000e) ret=407b173b 08073078:Ret x11drv.GetDeviceCaps() retval=00000001 ret=407b173b trace:bitmap:CreateBitmap 114x19, 65536 colors returning 00000870 trace:bitmap:X11DRV_DIB_DoProtectDIBSection Changed protection from 4 to 4 08073078:Ret x11drv.CreateDIBSection() retval=00000870 ret=407b4ac2 ....
Index: wine/graphics/x11drv/dib.c diff -u wine/graphics/x11drv/dib.c:1.91 wine/graphics/x11drv/dib.c:1.92 --- wine/graphics/x11drv/dib.c:1.91 Wed Apr 24 16:32:11 2002 +++ wine/graphics/x11drv/dib.c Sat May 4 13:32:48 2002 @@ -5793,16 +5793,8 @@ InitializeCriticalSection(&(dib->lock)); if (VIRTUAL_SetFaultHandler(bm.bmBits, X11DRV_DIB_FaultHandler, (LPVOID)res)) { - if (section || offset) - { - X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READWRITE ); - if (dib) dib->status = DIB_Status_AppMod; - } - else - { - X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READONLY ); - if (dib) dib->status = DIB_Status_InSync; - } + X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READWRITE ); + if (dib) dib->status = DIB_Status_AppMod; } }
Hmm,
Although that patch is correct, it seems that there is another bug - when calling [Set|Get]DIBits we really should be locking the DIBSection so that it coerces properly before the write/read. These use the DIBSection in GdiMod.
This patch fixes it.
David.
Changelog: - Lock/unlock (and hence maybe coerce) DIBSections into GdiMod during the SetDIBits and GetDIBits functions, before actually accessing the X Pixmap.
Licence: MIT/X11
Files affected: graphics/x11drv/dib.c
Patch Against: ReWind CVS 10 may 2002
On Fri, 10 May 2002 17:22:43 +0200, Mehmet YASAR wrote:
| Hi, | | the following patch incorporated in CVS may 3rd has broken BabyGammon | (you can get it at | http://www.directfichiers.com/babygammon/BAFR100DOGT90.EXE ) | | With it I have black background instead of the normal backgammon game. | If somebody could look at this ... | | Mehmet YASAR | | Extract from logs : | .... | 08073078:Call | user32.LoadImageA(00400000,0000006a,00000000,00000000,00000000,00002000) | ret=00407f17 | 08073078:Call | x11drv.CreateDIBSection(403844f4,403bb334,00000000,00000000,00000000,00000000,00000000) | ret=407b4ac2 | trace:bitmap:X11DRV_DIB_CreateDIBSection format (114,19), planes 1, bpp | 8, size 2204, colors 256 (RGB) | 08073078:Call x11drv.GetDeviceCaps(403844f4,0000000c) ret=407b173b | 08073078:Ret x11drv.GetDeviceCaps() retval=00000010 ret=407b173b | 08073078:Call x11drv.GetDeviceCaps(403844f4,0000000e) ret=407b173b | 08073078:Ret x11drv.GetDeviceCaps() retval=00000001 ret=407b173b | trace:bitmap:CreateBitmap 114x19, 65536 colors returning 00000870 | trace:bitmap:X11DRV_DIB_DoProtectDIBSection Changed protection from 4 to 4 | 08073078:Ret x11drv.CreateDIBSection() retval=00000870 ret=407b4ac2 | .... | | | | | | | | --- Next Part --- | | Index: wine/graphics/x11drv/dib.c | diff -u wine/graphics/x11drv/dib.c:1.91 wine/graphics/x11drv/dib.c:1.92 | --- wine/graphics/x11drv/dib.c:1.91 Wed Apr 24 16:32:11 2002 | +++ wine/graphics/x11drv/dib.c Sat May 4 13:32:48 2002 | @@ -5793,16 +5793,8 @@ | InitializeCriticalSection(&(dib->lock)); | if (VIRTUAL_SetFaultHandler(bm.bmBits, X11DRV_DIB_FaultHandler, (LPVOID)res)) | { | - if (section || offset) | - { | - X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READWRITE ); | - if (dib) dib->status = DIB_Status_AppMod; | - } | - else | - { | - X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READONLY ); | - if (dib) dib->status = DIB_Status_InSync; | - } | + X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READWRITE ); | + if (dib) dib->status = DIB_Status_AppMod; | } | } | | | | | | | |
David Hammerton wrote:
Hmm,
Although that patch is correct, it seems that there is another bug - when calling [Set|Get]DIBits we really should be locking the DIBSection so
that it
coerces properly before the write/read. These use the DIBSection in
GdiMod.
This patch fixes it.
David.
Changelog:
- Lock/unlock (and hence maybe coerce) DIBSections into GdiMod during
the SetDIBits and GetDIBits functions, before actually accessing the
X Pixmap.
Licence: MIT/X11
Files affected: graphics/x11drv/dib.c
Patch Against: ReWind CVS 10 may 2002
I confirm that's fixing BabyGammon. Thanks,
Mehmet