[PATCH v2] win32u: Don't use get_dc_ptr() in __wine_get_wgl_driver().
Paul Gofman
pgofman at codeweavers.com
Tue Mar 1 13:43:42 CST 2022
Hi Jacek,
thanks, this change in behaviour is not intentional. I will recent
with your suggested change.
Regards,
Paul.
On 3/1/22 19:45, Jacek Caban wrote:
> Hi Paul,
>
> On 2/24/22 14:15, Paul Gofman wrote:
>> +/***********************************************************************
>>
>> + * __wine_get_wgl_driver (win32u.@)
>> + */
>> +struct opengl_funcs * CDECL __wine_get_wgl_driver( HDC hdc, UINT
>> version )
>> +{
>> + BOOL dibdrv;
>> + DC * dc;
>> +
>> + if (!(dc = get_dc_obj( hdc ))) return NULL;
>> + if (dc->attr->disabled)
>> + {
>> + GDI_ReleaseObj( hdc );
>> + return NULL;
>> + }
>> + dibdrv = !dc->is_display;
>> + GDI_ReleaseObj( hdc );
>> +
>> + if (dibdrv)
>> + {
>> + if (version != WINE_WGL_DRIVER_VERSION)
>> + {
>> + ERR( "version mismatch, opengl32 wants %u but dibdrv has
>> %u\n", version, WINE_WGL_DRIVER_VERSION );
>> + return NULL;
>> + }
>> + return dibdrv_get_wgl_driver();
>> + }
>> + return user_driver->pwine_get_wgl_driver( version );
>> +}
>
>
> I didn't mean to suggest dropping the check for memdc, this changes
> behaviour over current code. Although such change may make some sense
> (I'm not sure), it would least deserve a separated commit and
> consideration about stock bitmap handling in osmesa code. How about
> doing it like in the attached, modified version of your patch?
>
>
> Thanks,
>
> Jacek
More information about the wine-devel
mailing list