http://bugs.winehq.org/show_bug.cgi?id=18490
naur mig21@static.int.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mig21@static.int.pl
--- Comment #3 from naur mig21@static.int.pl 2009-09-02 20:02:29 --- This crash happens because SetPixelFormat is called on screen device context (GetDC(NULL)). Wine refuses to set pixel format and returns FALSE which causes the crash. Note that technically Windows returns TRUE from SetPixelFormat when it gets the DC of desktop window (and most of the time this causes problems later, but that's off-topic). Based on those facts, I've made a simple and hackish workaround patch for this problem. After applying it, SetPixelFormat will save the pixel format in the X11DRV_PDEVICE and return TRUE instead of FALSE. This allows the game to run, although it degrades error checking. So I'm not expecting this to get included in Wine's repository. :-) My solution is also rather incomplete since Wine cannot actually modify the X root window. Besides, the real cause of problem is located higher in the the backtrace. The game is D3D9 based, so the bug might be located somewhere in Wine's D3D9 libraries. I'm including a backtrace from the point where SetPixelFormat receives invalid DC. The pPresentationParameters structure passed to D3D9 CreateDevice function has hDeviceWindow set to NULL and Windowed set to 1.