[Bug 43826] Tomb Raider (1996) GOG now launches only in safe mode

WineHQ Bugzilla wine-bugs at winehq.org
Mon Jul 13 14:52:13 CDT 2020


https://bugs.winehq.org/show_bug.cgi?id=43826

--- Comment #8 from qsniyg <qsniyg at mail.com> ---
Created attachment 67706
  --> https://bugs.winehq.org/attachment.cgi?id=67706
hack to allow wglSetPixelFormat to modify the pixel format

SDL_SetVideoMode (0x65fd6452 in glide2x.dll) fails, and the following is logged
in glide.log:

Video mode set failed: Unable to reset window for OpenGL context

It's using SDL 1.2.14, so looking at the source (WIN_GL_SetupWindow):

--- snip ---
if ( !SetPixelFormat(GL_hdc, pixel_format, &GL_pfd) ) {
    if ( i == 0 ) {
        if ( WIN_GL_ResetWindow(this) < 0 ) { // <-- This is where it crashes,
however
            return(-1);
        }
        continue;
    }
--- snip ---

However, the real problem is that SetPixelFormat crashes (I added an ERR trace
to figure out what was going on):

--- snip ---
0364:trace:wgl:set_pixel_format (0x110051,101)
0364:trace:wgl:get_pixel_format Returning fmt_id=0x1ab for iPixelFormat=101
0364:err:wgl:set_pixel_format prev 5 == format 101
0364:RET  SDL.SDL_SetVideoMode() retval=00000000 ret=08656457
--- snip ---

The hack I attached is incorrect, but it allows the game to run, by allowing it
to re-modify an existing pixel format.

-- 
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