winex11.drv: Report a GPU same as the host primary GPU in virtual desktop mode.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49631 Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
41acd014d8
commit
aadae4d1ea
|
@ -212,7 +212,12 @@ static BOOL X11DRV_desktop_get_gpus( struct x11drv_gpu **new_gpus, int *count )
|
|||
gpu = heap_calloc( 1, sizeof(*gpu) );
|
||||
if (!gpu) return FALSE;
|
||||
|
||||
if (!get_host_primary_gpu( gpu ))
|
||||
{
|
||||
WARN( "Failed to get host primary gpu.\n" );
|
||||
lstrcpyW( gpu->name, wine_adapterW );
|
||||
}
|
||||
|
||||
*new_gpus = gpu;
|
||||
*count = 1;
|
||||
return TRUE;
|
||||
|
|
|
@ -259,6 +259,21 @@ RECT get_host_primary_monitor_rect(void)
|
|||
return rect;
|
||||
}
|
||||
|
||||
BOOL get_host_primary_gpu(struct x11drv_gpu *gpu)
|
||||
{
|
||||
struct x11drv_gpu *gpus;
|
||||
INT gpu_count;
|
||||
|
||||
if (host_handler.get_gpus(&gpus, &gpu_count) && gpu_count)
|
||||
{
|
||||
*gpu = gpus[0];
|
||||
host_handler.free_gpus(gpus);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
RECT get_work_area(const RECT *monitor_rect)
|
||||
{
|
||||
Atom type;
|
||||
|
|
|
@ -792,6 +792,7 @@ struct x11drv_display_device_handler
|
|||
};
|
||||
|
||||
extern HANDLE get_display_device_init_mutex(void) DECLSPEC_HIDDEN;
|
||||
extern BOOL get_host_primary_gpu(struct x11drv_gpu *gpu) DECLSPEC_HIDDEN;
|
||||
extern void release_display_device_init_mutex(HANDLE) DECLSPEC_HIDDEN;
|
||||
extern void X11DRV_DisplayDevices_SetHandler(const struct x11drv_display_device_handler *handler) DECLSPEC_HIDDEN;
|
||||
extern void X11DRV_DisplayDevices_Init(BOOL force) DECLSPEC_HIDDEN;
|
||||
|
|
Loading…
Reference in New Issue