[PATCH 2/9] win32u: Introduce UpdateDisplayDevice user driver entry point.
Jacek Caban
jacek at codeweavers.com
Thu Nov 25 08:32:47 CST 2021
On 11/25/21 9:07 AM, Zhiyi Zhang wrote:
>>
>> +static BOOL update_display_cache(void)
>> +{
>> + struct device_manager_ctx ctx = { 0 };
>> +
>> + user_driver->pUpdateDisplayDevices( &device_manager, FALSE, &ctx );
>> + release_display_manager_ctx( &ctx );
>> +
>> + if (update_display_cache_from_registry()) return TRUE;
>> + if (ctx.gpu_count)
>> + {
>> + ERR( "driver reported devices, but we failed to read them\n" );
>> + return FALSE;
>> + }
>> +
>> + user_driver->pUpdateDisplayDevices( &device_manager, TRUE, &ctx );
>> + if (!ctx.gpu_count)
>> + {
>> + static const struct gdi_monitor default_monitor =
>> + {
>> + .rc_work.right = 1024,
>> + .rc_work.bottom = 768,
>> + .rc_monitor.right = 1024,
>> + .rc_monitor.bottom = 768,
>> + .state_flags = DISPLAY_DEVICE_ACTIVE,
>
> You probably should add DISPLAY_DEVICE_ATTACHED as well.
Yes, I will add it in v2.
> And there should be a name, e.g., "Generic Non-PnP Monitor".
Similar to GPU, default name is handled by add_monitor.
Thanks,
Jacek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20211125/9e2326e2/attachment.htm>
More information about the wine-devel
mailing list