Skip to content

Commit

Permalink
winex11.drv: Change order register_extension for WGL_ARB_pixel_format…
Browse files Browse the repository at this point in the history
…_float.

Some processes use very naive string matching when detecting extensions,
for example, Cossacks III checks if the extension is "contained" in the
current extension is checking, causing that `WGL_ARB_pixel_format` is
contained in `WGL_ARB_pixel_format_float`, but it ends up with the flag
deactivated because they aren't the same.

This makes it consistent with the behavior on winemac.drv/opengl.c
too.

CW-Bug-Id: #20532

Signed-off-by: Sebastián Aedo <[email protected]>
(cherry picked from commit fb7e468c32554d841fde695c03935e89ce94b049)
  • Loading branch information
etra0 authored and ivyl committed Jun 21, 2022
1 parent 095b2cb commit cf55e36
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions dlls/winex11.drv/opengl.c
Original file line number Diff line number Diff line change
Expand Up @@ -4517,11 +4517,6 @@ static void X11DRV_WineGL_LoadExtensions(void)
register_extension("WGL_ARB_create_context_profile");
}

if (has_extension( glxExtensions, "GLX_ARB_fbconfig_float"))
{
register_extension("WGL_ARB_pixel_format_float");
register_extension("WGL_ATI_pixel_format_float");
}

register_extension( "WGL_ARB_extensions_string" );
opengl_funcs.ext.p_wglGetExtensionsStringARB = X11DRV_wglGetExtensionsStringARB;
Expand Down Expand Up @@ -4551,6 +4546,12 @@ static void X11DRV_WineGL_LoadExtensions(void)
opengl_funcs.ext.p_wglGetPixelFormatAttribfvARB = X11DRV_wglGetPixelFormatAttribfvARB;
opengl_funcs.ext.p_wglGetPixelFormatAttribivARB = X11DRV_wglGetPixelFormatAttribivARB;

if (has_extension( glxExtensions, "GLX_ARB_fbconfig_float"))
{
register_extension("WGL_ARB_pixel_format_float");
register_extension("WGL_ATI_pixel_format_float");
}

/* Support WGL_ARB_render_texture when there's support or pbuffer based emulation */
if (has_extension( glxExtensions, "GLX_ARB_render_texture") ||
(glxRequireVersion(3) && use_render_texture_emulation))
Expand Down

0 comments on commit cf55e36

Please sign in to comment.