[Bug 9378] Combat Mission Shock Force DEMO: ' Could not initialize OpenGL graphics.'
wine-bugs at winehq.org
wine-bugs at winehq.org
Wed May 24 14:06:58 CDT 2017
https://bugs.winehq.org/show_bug.cgi?id=9378
Alexander Puzankov <alxpnv at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |alxpnv at gmail.com
--- Comment #17 from Alexander Puzankov <alxpnv at gmail.com> ---
Problem is in pixel formats returned by DescribePixelFormat, specifically in
the cAlphaShift field. Combat Mission engine enumerates these until
cAlphaShift=24 is found (amongst other checks), but Wine always sets 0 there.
This patch seems to fix the issue:
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -1725,7 +1725,7 @@ static int glxdrv_wglDescribePixelFormat
ppfd->cGreenBits = gb;
ppfd->cGreenShift = bb + ab;
ppfd->cAlphaBits = ab;
- ppfd->cAlphaShift = 0;
+ ppfd->cAlphaShift = 24;
} else {
ppfd->cRedBits = 0;
ppfd->cRedShift = 0;
But I'm not entirely sure this doesn't break something else (in other apps), or
is otherwise the correct way.
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list