Rémi Bernon (@rbernon) commented about dlls/opengl32/wgl.c:
+ WARN( "wglGetPixelFormatAttribivARB returned %#lx\n", status ); + + return args.ret; + } + + if (!count) return GL_TRUE; + if (count == 1 && attributes[0] == WGL_NUMBER_PIXEL_FORMATS_ARB) + { + values[0] = num_formats; + return GL_TRUE; + } + if (index <= 0 || index > num_formats) + { + SetLastError( invalid_data_error ); + return GL_FALSE; + }
if (!count) return TRUE;
if (count == 1 && attributes[0] == WGL_NUMBER_PIXEL_FORMATS_ARB)
{
values[0] = num_formats;
return TRUE;
}
if (index <= 0 || index > num_formats)
{
SetLastError( invalid_data_error );
return FALSE;
}
Sorry, I used GL_ prefixed constants in my suggestion, but I think it's better to use the same constants everywhere in this function. As the return type is BOOL and not GLboolean, I'd suggest to use TRUE/FALSE instead. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5844#note_73674