http://bugs.winehq.org/show_bug.cgi?id=17505
Summary: Riven: mouse cursor is drawn on a checkerboard background Product: Wine Version: 1.1.15 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: winex11.drv AssignedTo: wine-bugs@winehq.org ReportedBy: skuller@skuller.ath.cx
Created an attachment (id=19612) --> (http://bugs.winehq.org/attachment.cgi?id=19612) Mark nearly black samples as entirely transparent
When running the DVD version of Riven in Wine, in-game mouse cursor is drawn on a semi-transparent checkerboard background [1]. This bug seems to be related to the Xcursor code path in dlls/winex11.drv/mouse.c, since when I remove libXcursor.so.1 out of the way so that Wine falls back to the original pixmap cursor handling code, in-game cursor is drawn correctly [2].
[1] http://skuller.ath.cx/tmp/riven1.png [2] http://skuller.ath.cx/tmp/riven2.png
As far as I understand the code, checkerboard pattern results from the way inverted colors are emulated in the create_cursor_image() function. Riven creates a 32 bit bitmap with an empty alpha channel, with transparent pixels (as defined by AND mask) being nearly black (but not quite, 0x040404 to be precise). Then the sampled grayscale value of 0x04 is mapped to the alpha channel and the pixel color is inverted, resulting in a semi-transparent background (which is very visible — perhaps X supports only discrete values for alpha?).
Attached patch attempts to fix this issue by checking for small grayscale samples being mapped to the alpha channel (less than 5% opacity) and marking the resulting pixel entirely transparent for such samples.
http://bugs.winehq.org/show_bug.cgi?id=17505
--- Comment #1 from H. Verbeet hverbeet@gmail.com 2009-02-22 13:09:06 --- If it's a 32-bit cursor, the problem is probably that CreateDIBitmap() in CURSORICON_CreateIconFromBMI() loses the alpha channel.
http://bugs.winehq.org/show_bug.cgi?id=17505
--- Comment #2 from Andrey Nazarov skuller@skuller.ath.cx 2009-02-23 07:32:44 --- No, Riven appears to use a 8-bit DIB for the original cursor, which gets converted into a 32-bit DDB by CreateDIBitmap() in CURSORICON_CreateIconFromBMI().
http://bugs.winehq.org/show_bug.cgi?id=17505
Daniel Santos daniel.santos@pobox.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.santos@pobox.com
http://bugs.winehq.org/show_bug.cgi?id=17505
--- Comment #3 from Austin English austinenglish@gmail.com 2010-09-07 16:48:30 CDT --- This is your friendly reminder that there has been no bug activity for a year. Is this still an issue in current (1.3.2 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=17505
GyB gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gyebro69@gmail.com
--- Comment #4 from GyB gyebro69@gmail.com 2012-02-13 12:53:43 CST --- I have the digital distribution version of Riven (not the DVD version), but I couldn't reproduce the problem neither with Wine-1.1.15 nor with the current 1.4rc3 version. This doesn't mean anything: either this version of the game is not affected by this bug, or maybe due to the different/newer X Server version (1.11.4).
Andrey, do you still have the reported problem with Riven using a recent Wine version (1.4rc3 or newer)?
http://bugs.winehq.org/show_bug.cgi?id=17505
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |WORKSFORME
--- Comment #5 from Austin English austinenglish@gmail.com 2013-11-13 15:32:01 CST --- (In reply to comment #4)
I have the digital distribution version of Riven (not the DVD version), but I couldn't reproduce the problem neither with Wine-1.1.15 nor with the current 1.4rc3 version. This doesn't mean anything: either this version of the game is not affected by this bug, or maybe due to the different/newer X Server version (1.11.4).
Andrey, do you still have the reported problem with Riven using a recent Wine version (1.4rc3 or newer)?
No reply in 3 years, closing WORKSFORME.
http://bugs.winehq.org/show_bug.cgi?id=17505
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Austin English austinenglish@gmail.com 2013-11-13 15:40:23 CST --- Closing.