In order to implement the patch discussed in https://gitlab.winehq.org/wine/wine/-/merge_requests/5491#note_67907
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/sysparams.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 6993373ca54..8f0a89c75db 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -1482,21 +1482,6 @@ static const struct gdi_device_manager device_manager = add_modes, };
-static void reset_display_manager_ctx( struct device_manager_ctx *ctx ) -{ - HANDLE mutex = ctx->mutex; - - if (ctx->source_key) - { - NtClose( ctx->source_key ); - last_query_display_time = 0; - } - if (ctx->gpu_count) cleanup_devices(); - - memset( ctx, 0, sizeof(*ctx) ); - if ((ctx->mutex = mutex)) prepare_devices(); -} - static void release_display_manager_ctx( struct device_manager_ctx *ctx ) { if (ctx->mutex) @@ -1505,7 +1490,13 @@ static void release_display_manager_ctx( struct device_manager_ctx *ctx ) release_display_device_init_mutex( ctx->mutex ); ctx->mutex = 0; } - reset_display_manager_ctx( ctx ); + + if (ctx->source_key) + { + NtClose( ctx->source_key ); + last_query_display_time = 0; + } + if (ctx->gpu_count) cleanup_devices(); }
static void clear_display_devices(void)
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/sysparams.c | 24 +++++------------------- dlls/winemac.drv/display.c | 11 +++++++---- dlls/winex11.drv/xrandr.c | 4 ++-- include/wine/gdi_driver.h | 15 ++++++++++----- 4 files changed, 24 insertions(+), 30 deletions(-)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 8f0a89c75db..0becee77a1d 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -84,14 +84,6 @@ static const char guid_devinterface_monitorA[] = "{E6F07B5F-EE97-4A90-B076-33F57
#define NEXT_DEVMODEW(mode) ((DEVMODEW *)((char *)((mode) + 1) + (mode)->dmDriverExtra))
-struct pci_id -{ - UINT16 vendor; - UINT16 device; - UINT16 subsystem; - UINT16 revision; -}; - struct gpu { LONG refcount; @@ -1187,21 +1179,15 @@ static BOOL write_gpu_to_registry( const struct gpu *gpu, const struct pci_id *p
static void add_gpu( const struct gdi_gpu *gpu, void *param ) { - const struct pci_id pci_id = - { - .vendor = gpu->vendor_id, - .device = gpu->device_id, - .subsystem = gpu->subsys_id, - .revision = gpu->revision_id, - }; + const struct pci_id *pci_id = &gpu->pci_id; struct device_manager_ctx *ctx = param; char buffer[4096]; KEY_VALUE_PARTIAL_INFORMATION *value = (void *)buffer; unsigned int i; HKEY hkey, subkey;
- TRACE( "%s %04X %04X %08X %02X\n", debugstr_w(gpu->name), - gpu->vendor_id, gpu->device_id, gpu->subsys_id, gpu->revision_id ); + TRACE( "%s %04X %04X %08X %02X\n", debugstr_w( gpu->name ), pci_id->vendor, pci_id->device, + pci_id->subsystem, pci_id->revision );
if (!enum_key && !(enum_key = reg_create_ascii_key( NULL, enum_keyA, 0, NULL ))) return; @@ -1219,7 +1205,7 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param ) ctx->gpu.vulkan_uuid = gpu->vulkan_uuid;
snprintf( ctx->gpu.path, sizeof(ctx->gpu.path), "PCI\VEN_%04X&DEV_%04X&SUBSYS_%08X&REV_%02X\%08X", - gpu->vendor_id, gpu->device_id, gpu->subsys_id, gpu->revision_id, ctx->gpu.index ); + pci_id->vendor, pci_id->device, pci_id->subsystem, pci_id->revision, ctx->gpu.index ); if (!(hkey = reg_create_ascii_key( enum_key, ctx->gpu.path, 0, NULL ))) return;
if ((subkey = reg_create_ascii_key( hkey, "Device Parameters", 0, NULL ))) @@ -1259,7 +1245,7 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param )
NtClose( hkey );
- if (!write_gpu_to_registry( &ctx->gpu, &pci_id, gpu->memory_size )) + if (!write_gpu_to_registry( &ctx->gpu, pci_id, gpu->memory_size )) WARN( "Failed to write gpu to registry\n" ); else ctx->gpu_count++; diff --git a/dlls/winemac.drv/display.c b/dlls/winemac.drv/display.c index 5221f4402fa..b52bb39c0f6 100644 --- a/dlls/winemac.drv/display.c +++ b/dlls/winemac.drv/display.c @@ -1142,10 +1142,13 @@ BOOL macdrv_UpdateDisplayDevices( const struct gdi_device_manager *device_manage struct gdi_gpu gdi_gpu = { .id = gpu->id, - .vendor_id = gpu->vendor_id, - .device_id = gpu->device_id, - .subsys_id = gpu->subsys_id, - .revision_id = gpu->revision_id, + .pci_id = + { + .vendor = gpu->vendor_id, + .device = gpu->device_id, + .subsystem = gpu->subsys_id, + .revision = gpu->revision_id, + }, }; RtlUTF8ToUnicodeN(gdi_gpu.name, sizeof(gdi_gpu.name), &len, gpu->name, strlen(gpu->name)); device_manager->add_gpu(&gdi_gpu, param); diff --git a/dlls/winex11.drv/xrandr.c b/dlls/winex11.drv/xrandr.c index 002ab77c086..15d0c7e0709 100644 --- a/dlls/winex11.drv/xrandr.c +++ b/dlls/winex11.drv/xrandr.c @@ -737,8 +737,8 @@ static BOOL get_gpu_properties_from_vulkan( struct gdi_gpu *gpu, const XRRProvid /* Ignore Khronos vendor IDs */ if (properties2.properties.vendorID < 0x10000) { - gpu->vendor_id = properties2.properties.vendorID; - gpu->device_id = properties2.properties.deviceID; + gpu->pci_id.vendor = properties2.properties.vendorID; + gpu->pci_id.device = properties2.properties.deviceID; } RtlUTF8ToUnicodeN( gpu->name, sizeof(gpu->name), &len, properties2.properties.deviceName, strlen( properties2.properties.deviceName ) + 1 ); diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index 61c9342d50f..447b5a86988 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -237,14 +237,19 @@ static inline ULONG window_surface_release( struct window_surface *surface )
/* display manager interface, used to initialize display device registry data */
+struct pci_id +{ + UINT16 vendor; + UINT16 device; + UINT16 subsystem; + UINT16 revision; +}; + struct gdi_gpu { ULONG_PTR id; - WCHAR name[128]; /* name */ - UINT vendor_id; /* PCI ID */ - UINT device_id; - UINT subsys_id; - UINT revision_id; + WCHAR name[128]; + struct pci_id pci_id; GUID vulkan_uuid; /* Vulkan device UUID */ ULONGLONG memory_size; };
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winemac.drv/display.c | 1 - dlls/winewayland.drv/display.c | 3 +-- dlls/winex11.drv/display.c | 13 ++++++++++--- dlls/winex11.drv/x11drv.h | 13 +++++++++++-- dlls/winex11.drv/xinerama.c | 6 +++--- dlls/winex11.drv/xrandr.c | 14 +++++++------- include/wine/gdi_driver.h | 1 - 7 files changed, 32 insertions(+), 19 deletions(-)
diff --git a/dlls/winemac.drv/display.c b/dlls/winemac.drv/display.c index b52bb39c0f6..fc2e680ca88 100644 --- a/dlls/winemac.drv/display.c +++ b/dlls/winemac.drv/display.c @@ -1141,7 +1141,6 @@ BOOL macdrv_UpdateDisplayDevices( const struct gdi_device_manager *device_manage { struct gdi_gpu gdi_gpu = { - .id = gpu->id, .pci_id = { .vendor = gpu->vendor_id, diff --git a/dlls/winewayland.drv/display.c b/dlls/winewayland.drv/display.c index 535a3c80ce3..efe5683d4eb 100644 --- a/dlls/winewayland.drv/display.c +++ b/dlls/winewayland.drv/display.c @@ -204,8 +204,7 @@ static void wayland_add_device_gpu(const struct gdi_device_manager *device_manag struct gdi_gpu gpu = {0}; lstrcpyW(gpu.name, wayland_gpuW);
- TRACE("id=0x%s name=%s\n", - wine_dbgstr_longlong(gpu.id), wine_dbgstr_w(gpu.name)); + TRACE("name=%s\n", wine_dbgstr_w(gpu.name));
device_manager->add_gpu(&gpu, param); } diff --git a/dlls/winex11.drv/display.c b/dlls/winex11.drv/display.c index b4a2e4b9487..798381a07fd 100644 --- a/dlls/winex11.drv/display.c +++ b/dlls/winex11.drv/display.c @@ -396,7 +396,7 @@ POINT root_to_virtual_screen(INT x, INT y) RECT get_host_primary_monitor_rect(void) { INT gpu_count, adapter_count, monitor_count; - struct gdi_gpu *gpus = NULL; + struct x11drv_gpu *gpus = NULL; struct x11drv_adapter *adapters = NULL; struct gdi_monitor *monitors = NULL; RECT rect = {0}; @@ -498,7 +498,7 @@ BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manage { struct x11drv_adapter *adapters; struct gdi_monitor *monitors; - struct gdi_gpu *gpus; + struct x11drv_gpu *gpus; INT gpu_count, adapter_count, monitor_count; INT gpu, adapter, monitor; DEVMODEW *modes; @@ -515,7 +515,14 @@ BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manage
for (gpu = 0; gpu < gpu_count; gpu++) { - device_manager->add_gpu( &gpus[gpu], param ); + struct gdi_gpu gdi_gpu = + { + .pci_id = gpus[gpu].pci_id, + .vulkan_uuid = gpus[gpu].vulkan_uuid, + .memory_size = gpus[gpu].memory_size, + }; + memcpy( gdi_gpu.name, gpus[gpu].name, sizeof(gdi_gpu.name) ); + device_manager->add_gpu( &gdi_gpu, param );
/* Initialize adapters */ if (!host_handler.get_adapters( gpus[gpu].id, &adapters, &adapter_count )) break; diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 1e13122076c..5f92857e1d8 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -761,6 +761,15 @@ void init_user_driver(void);
/* X11 display device handler. Used to initialize display device registry data */
+struct x11drv_gpu +{ + ULONG_PTR id; + WCHAR name[128]; + struct pci_id pci_id; + GUID vulkan_uuid; + ULONGLONG memory_size; +}; + struct x11drv_adapter { ULONG_PTR id; @@ -779,7 +788,7 @@ struct x11drv_display_device_handler /* get_gpus will be called to get a list of GPUs. First GPU has to be where the primary adapter is. * * Return FALSE on failure with parameters unchanged */ - BOOL (*get_gpus)(struct gdi_gpu **gpus, int *count, BOOL get_properties); + BOOL (*get_gpus)(struct x11drv_gpu **gpus, int *count, BOOL get_properties);
/* get_adapters will be called to get a list of adapters in EnumDisplayDevices context under a GPU. * The first adapter has to be primary if GPU is primary. @@ -794,7 +803,7 @@ struct x11drv_display_device_handler BOOL (*get_monitors)(ULONG_PTR adapter_id, struct gdi_monitor **monitors, int *count);
/* free_gpus will be called to free a GPU list from get_gpus */ - void (*free_gpus)(struct gdi_gpu *gpus); + void (*free_gpus)(struct x11drv_gpu *gpus);
/* free_adapters will be called to free an adapter list from get_adapters */ void (*free_adapters)(struct x11drv_adapter *adapters); diff --git a/dlls/winex11.drv/xinerama.c b/dlls/winex11.drv/xinerama.c index fbf80819204..5f489feb59d 100644 --- a/dlls/winex11.drv/xinerama.c +++ b/dlls/winex11.drv/xinerama.c @@ -190,10 +190,10 @@ done: return ret; }
-static BOOL xinerama_get_gpus( struct gdi_gpu **new_gpus, int *count, BOOL get_properties ) +static BOOL xinerama_get_gpus( struct x11drv_gpu **new_gpus, int *count, BOOL get_properties ) { static const WCHAR wine_adapterW[] = {'W','i','n','e',' ','A','d','a','p','t','e','r',0}; - struct gdi_gpu *gpus; + struct x11drv_gpu *gpus;
/* Xinerama has no support for GPU, faking one */ gpus = calloc( 1, sizeof(*gpus) ); @@ -208,7 +208,7 @@ static BOOL xinerama_get_gpus( struct gdi_gpu **new_gpus, int *count, BOOL get_p return TRUE; }
-static void xinerama_free_gpus( struct gdi_gpu *gpus ) +static void xinerama_free_gpus( struct x11drv_gpu *gpus ) { free( gpus ); } diff --git a/dlls/winex11.drv/xrandr.c b/dlls/winex11.drv/xrandr.c index 15d0c7e0709..debc6af58cb 100644 --- a/dlls/winex11.drv/xrandr.c +++ b/dlls/winex11.drv/xrandr.c @@ -627,8 +627,8 @@ static BOOL is_crtc_primary( RECT primary, const XRRCrtcInfo *crtc )
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayKHR)
-static BOOL get_gpu_properties_from_vulkan( struct gdi_gpu *gpu, const XRRProviderInfo *provider_info, - struct gdi_gpu *prev_gpus, int prev_gpu_count ) +static BOOL get_gpu_properties_from_vulkan( struct x11drv_gpu *gpu, const XRRProviderInfo *provider_info, + struct x11drv_gpu *prev_gpus, int prev_gpu_count ) { static const char *extensions[] = { @@ -768,10 +768,10 @@ done:
/* Get a list of GPUs reported by XRandR 1.4. Set get_properties to FALSE if GPU properties are * not needed to avoid unnecessary querying */ -static BOOL xrandr14_get_gpus( struct gdi_gpu **new_gpus, int *count, BOOL get_properties ) +static BOOL xrandr14_get_gpus( struct x11drv_gpu **new_gpus, int *count, BOOL get_properties ) { static const WCHAR wine_adapterW[] = {'W','i','n','e',' ','A','d','a','p','t','e','r',0}; - struct gdi_gpu *gpus = NULL; + struct x11drv_gpu *gpus = NULL; XRRScreenResources *screen_resources = NULL; XRRProviderResources *provider_resources = NULL; XRRProviderInfo *provider_info = NULL; @@ -844,7 +844,7 @@ static BOOL xrandr14_get_gpus( struct gdi_gpu **new_gpus, int *count, BOOL get_p /* Make primary GPU the first */ if (primary_provider > 0) { - struct gdi_gpu tmp = gpus[0]; + struct x11drv_gpu tmp = gpus[0]; gpus[0] = gpus[primary_provider]; gpus[primary_provider] = tmp; } @@ -865,7 +865,7 @@ done: return ret; }
-static void xrandr14_free_gpus( struct gdi_gpu *gpus ) +static void xrandr14_free_gpus( struct x11drv_gpu *gpus ) { free( gpus ); } @@ -1227,7 +1227,7 @@ static BOOL xrandr14_get_id( const WCHAR *device_name, BOOL is_primary, x11drv_s INT gpu_count, adapter_count, new_current_mode_count = 0; INT gpu_idx, adapter_idx, display_idx; struct x11drv_adapter *adapters; - struct gdi_gpu *gpus; + struct x11drv_gpu *gpus; WCHAR *end;
/* Parse \.\DISPLAY%d */ diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index 447b5a86988..714db83e89c 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -247,7 +247,6 @@ struct pci_id
struct gdi_gpu { - ULONG_PTR id; WCHAR name[128]; struct pci_id pci_id; GUID vulkan_uuid; /* Vulkan device UUID */
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/sysparams.c | 17 +++++++++-------- dlls/wineandroid.drv/init.c | 4 ++-- dlls/winemac.drv/display.c | 16 ++++++---------- dlls/winewayland.drv/display.c | 8 +++----- dlls/winex11.drv/display.c | 16 +++++----------- dlls/winex11.drv/x11drv.h | 4 ++-- dlls/winex11.drv/xinerama.c | 7 +++---- dlls/winex11.drv/xrandr.c | 16 ++++++---------- include/wine/gdi_driver.h | 10 +--------- 9 files changed, 37 insertions(+), 61 deletions(-)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 0becee77a1d..00bc7e0a6e1 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -1177,16 +1177,17 @@ static BOOL write_gpu_to_registry( const struct gpu *gpu, const struct pci_id *p return TRUE; }
-static void add_gpu( const struct gdi_gpu *gpu, void *param ) +static void add_gpu( const char *name, const struct pci_id *pci_id, const GUID *vulkan_uuid, + ULONGLONG memory_size, void *param ) { - const struct pci_id *pci_id = &gpu->pci_id; struct device_manager_ctx *ctx = param; char buffer[4096]; KEY_VALUE_PARTIAL_INFORMATION *value = (void *)buffer; unsigned int i; HKEY hkey, subkey; + DWORD len;
- TRACE( "%s %04X %04X %08X %02X\n", debugstr_w( gpu->name ), pci_id->vendor, pci_id->device, + TRACE( "%s %04X %04X %08X %02X\n", debugstr_a( name ), pci_id->vendor, pci_id->device, pci_id->subsystem, pci_id->revision );
if (!enum_key && !(enum_key = reg_create_ascii_key( NULL, enum_keyA, 0, NULL ))) @@ -1201,8 +1202,8 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param )
memset( &ctx->gpu, 0, sizeof(ctx->gpu) ); ctx->gpu.index = ctx->gpu_count; - lstrcpyW( ctx->gpu.name, gpu->name ); - ctx->gpu.vulkan_uuid = gpu->vulkan_uuid; + if (vulkan_uuid) ctx->gpu.vulkan_uuid = *vulkan_uuid; + if (name) RtlUTF8ToUnicodeN( ctx->gpu.name, sizeof(ctx->gpu.name) - sizeof(WCHAR), &len, name, strlen( name ) );
snprintf( ctx->gpu.path, sizeof(ctx->gpu.path), "PCI\VEN_%04X&DEV_%04X&SUBSYS_%08X&REV_%02X\%08X", pci_id->vendor, pci_id->device, pci_id->subsystem, pci_id->revision, ctx->gpu.index ); @@ -1245,7 +1246,7 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param )
NtClose( hkey );
- if (!write_gpu_to_registry( &ctx->gpu, pci_id, gpu->memory_size )) + if (!write_gpu_to_registry( &ctx->gpu, pci_id, memory_size )) WARN( "Failed to write gpu to registry\n" ); else ctx->gpu_count++; @@ -1728,13 +1729,13 @@ static BOOL default_update_display_devices( BOOL force, struct device_manager_ct .dmBitsPerPel = 16, .dmPelsWidth = 1024, .dmPelsHeight = 768, .dmDisplayFrequency = 60, }, }; static const DWORD source_flags = DISPLAY_DEVICE_ATTACHED_TO_DESKTOP | DISPLAY_DEVICE_PRIMARY_DEVICE | DISPLAY_DEVICE_VGA_COMPATIBLE; - static const struct gdi_gpu gpu; + struct pci_id pci_id = {0}; struct gdi_monitor monitor = {0}; DEVMODEW mode = {{0}};
if (!force) return TRUE;
- add_gpu( &gpu, ctx ); + add_gpu( "Default GPU", &pci_id, NULL, 0, ctx ); add_source( "Default", source_flags, ctx );
if (!read_source_mode( ctx->source_key, ENUM_CURRENT_SETTINGS, &mode )) diff --git a/dlls/wineandroid.drv/init.c b/dlls/wineandroid.drv/init.c index d1894535bfb..264bd6a7908 100644 --- a/dlls/wineandroid.drv/init.c +++ b/dlls/wineandroid.drv/init.c @@ -274,7 +274,7 @@ BOOL ANDROID_UpdateDisplayDevices( const struct gdi_device_manager *device_manag if (force || force_display_devices_refresh) { static const DWORD source_flags = DISPLAY_DEVICE_ATTACHED_TO_DESKTOP | DISPLAY_DEVICE_PRIMARY_DEVICE | DISPLAY_DEVICE_VGA_COMPATIBLE; - static const struct gdi_gpu gpu; + struct pci_id pci_id = {0}; struct gdi_monitor gdi_monitor = { .rc_monitor = virtual_screen_rect, @@ -288,7 +288,7 @@ BOOL ANDROID_UpdateDisplayDevices( const struct gdi_device_manager *device_manag }; DEVMODEW current = mode;
- device_manager->add_gpu( &gpu, param ); + device_manager->add_gpu( "Android GPU", &pci_id, NULL, 0, param ); device_manager->add_source( "Default", source_flags, param ); device_manager->add_monitor( &gdi_monitor, param );
diff --git a/dlls/winemac.drv/display.c b/dlls/winemac.drv/display.c index fc2e680ca88..78019d43de9 100644 --- a/dlls/winemac.drv/display.c +++ b/dlls/winemac.drv/display.c @@ -1139,18 +1139,14 @@ BOOL macdrv_UpdateDisplayDevices( const struct gdi_device_manager *device_manage
for (gpu = gpus; gpu < gpus + gpu_count; gpu++) { - struct gdi_gpu gdi_gpu = + struct pci_id pci_id = { - .pci_id = - { - .vendor = gpu->vendor_id, - .device = gpu->device_id, - .subsystem = gpu->subsys_id, - .revision = gpu->revision_id, - }, + .vendor = gpu->vendor_id, + .device = gpu->device_id, + .subsystem = gpu->subsys_id, + .revision = gpu->revision_id, }; - RtlUTF8ToUnicodeN(gdi_gpu.name, sizeof(gdi_gpu.name), &len, gpu->name, strlen(gpu->name)); - device_manager->add_gpu(&gdi_gpu, param); + device_manager->add_gpu(gpu->name, &pci_id, NULL, 0, param);
/* Initialize adapters */ if (macdrv_get_adapters(gpu->id, &adapters, &adapter_count)) break; diff --git a/dlls/winewayland.drv/display.c b/dlls/winewayland.drv/display.c index efe5683d4eb..ffe46117191 100644 --- a/dlls/winewayland.drv/display.c +++ b/dlls/winewayland.drv/display.c @@ -200,13 +200,11 @@ static void output_info_array_arrange_physical_coords(struct wl_array *output_in static void wayland_add_device_gpu(const struct gdi_device_manager *device_manager, void *param) { - static const WCHAR wayland_gpuW[] = {'W','a','y','l','a','n','d','G','P','U',0}; - struct gdi_gpu gpu = {0}; - lstrcpyW(gpu.name, wayland_gpuW); + struct pci_id pci_id = {0};
- TRACE("name=%s\n", wine_dbgstr_w(gpu.name)); + TRACE("\n");
- device_manager->add_gpu(&gpu, param); + device_manager->add_gpu("WaylandGPU", &pci_id, NULL, 0, param); }
static void wayland_add_device_source(const struct gdi_device_manager *device_manager, diff --git a/dlls/winex11.drv/display.c b/dlls/winex11.drv/display.c index 798381a07fd..bfee95b6642 100644 --- a/dlls/winex11.drv/display.c +++ b/dlls/winex11.drv/display.c @@ -407,7 +407,7 @@ RECT get_host_primary_monitor_rect(void) host_handler.get_monitors(adapters[0].id, &monitors, &monitor_count) && monitor_count) rect = monitors[0].rc_monitor;
- if (gpus) host_handler.free_gpus(gpus); + if (gpus) host_handler.free_gpus( gpus, gpu_count ); if (adapters) host_handler.free_adapters(adapters); if (monitors) host_handler.free_monitors(monitors, monitor_count); return rect; @@ -515,18 +515,12 @@ BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manage
for (gpu = 0; gpu < gpu_count; gpu++) { - struct gdi_gpu gdi_gpu = - { - .pci_id = gpus[gpu].pci_id, - .vulkan_uuid = gpus[gpu].vulkan_uuid, - .memory_size = gpus[gpu].memory_size, - }; - memcpy( gdi_gpu.name, gpus[gpu].name, sizeof(gdi_gpu.name) ); - device_manager->add_gpu( &gdi_gpu, param ); + device_manager->add_gpu( gpus[gpu].name, &gpus[gpu].pci_id, &gpus[gpu].vulkan_uuid, + gpus[gpu].memory_size, param );
/* Initialize adapters */ if (!host_handler.get_adapters( gpus[gpu].id, &adapters, &adapter_count )) break; - TRACE("GPU: %#lx %s, adapter count: %d\n", gpus[gpu].id, wine_dbgstr_w(gpus[gpu].name), adapter_count); + TRACE( "GPU: %#lx %s, adapter count: %d\n", gpus[gpu].id, debugstr_a( gpus[gpu].name ), adapter_count );
for (adapter = 0; adapter < adapter_count; adapter++) { @@ -564,7 +558,7 @@ BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manage host_handler.free_adapters( adapters ); }
- host_handler.free_gpus( gpus ); + host_handler.free_gpus( gpus, gpu_count ); return TRUE; }
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 5f92857e1d8..d8d5622abfd 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -764,7 +764,7 @@ void init_user_driver(void); struct x11drv_gpu { ULONG_PTR id; - WCHAR name[128]; + char *name; struct pci_id pci_id; GUID vulkan_uuid; ULONGLONG memory_size; @@ -803,7 +803,7 @@ struct x11drv_display_device_handler BOOL (*get_monitors)(ULONG_PTR adapter_id, struct gdi_monitor **monitors, int *count);
/* free_gpus will be called to free a GPU list from get_gpus */ - void (*free_gpus)(struct x11drv_gpu *gpus); + void (*free_gpus)(struct x11drv_gpu *gpus, int count);
/* free_adapters will be called to free an adapter list from get_adapters */ void (*free_adapters)(struct x11drv_adapter *adapters); diff --git a/dlls/winex11.drv/xinerama.c b/dlls/winex11.drv/xinerama.c index 5f489feb59d..798e24c47c5 100644 --- a/dlls/winex11.drv/xinerama.c +++ b/dlls/winex11.drv/xinerama.c @@ -192,7 +192,6 @@ done:
static BOOL xinerama_get_gpus( struct x11drv_gpu **new_gpus, int *count, BOOL get_properties ) { - static const WCHAR wine_adapterW[] = {'W','i','n','e',' ','A','d','a','p','t','e','r',0}; struct x11drv_gpu *gpus;
/* Xinerama has no support for GPU, faking one */ @@ -200,16 +199,16 @@ static BOOL xinerama_get_gpus( struct x11drv_gpu **new_gpus, int *count, BOOL ge if (!gpus) return FALSE;
- lstrcpyW( gpus[0].name, wine_adapterW ); - + gpus[0].name = strdup( "Wine Adapter" ); *new_gpus = gpus; *count = 1;
return TRUE; }
-static void xinerama_free_gpus( struct x11drv_gpu *gpus ) +static void xinerama_free_gpus( struct x11drv_gpu *gpus, int count ) { + while (count--) free( gpus[count].name ); free( gpus ); }
diff --git a/dlls/winex11.drv/xrandr.c b/dlls/winex11.drv/xrandr.c index debc6af58cb..c5a0e5856a0 100644 --- a/dlls/winex11.drv/xrandr.c +++ b/dlls/winex11.drv/xrandr.c @@ -653,7 +653,6 @@ static BOOL get_gpu_properties_from_vulkan( struct x11drv_gpu *gpu, const XRRPro VkPhysicalDeviceIDProperties id; VkInstance vk_instance = NULL; VkDisplayKHR vk_display; - DWORD len; BOOL ret = FALSE; VkResult vr;
@@ -740,8 +739,7 @@ static BOOL get_gpu_properties_from_vulkan( struct x11drv_gpu *gpu, const XRRPro gpu->pci_id.vendor = properties2.properties.vendorID; gpu->pci_id.device = properties2.properties.deviceID; } - RtlUTF8ToUnicodeN( gpu->name, sizeof(gpu->name), &len, properties2.properties.deviceName, - strlen( properties2.properties.deviceName ) + 1 ); + gpu->name = strdup( properties2.properties.deviceName );
pvkGetPhysicalDeviceMemoryProperties( vk_physical_devices[device_idx], &mem_properties ); for (heap_idx = 0; heap_idx < mem_properties.memoryHeapCount; heap_idx++) @@ -770,7 +768,6 @@ done: * not needed to avoid unnecessary querying */ static BOOL xrandr14_get_gpus( struct x11drv_gpu **new_gpus, int *count, BOOL get_properties ) { - static const WCHAR wine_adapterW[] = {'W','i','n','e',' ','A','d','a','p','t','e','r',0}; struct x11drv_gpu *gpus = NULL; XRRScreenResources *screen_resources = NULL; XRRProviderResources *provider_resources = NULL; @@ -779,7 +776,6 @@ static BOOL xrandr14_get_gpus( struct x11drv_gpu **new_gpus, int *count, BOOL ge INT primary_provider = -1; RECT primary_rect; BOOL ret = FALSE; - DWORD len; INT i, j;
screen_resources = xrandr_get_screen_resources(); @@ -799,7 +795,7 @@ static BOOL xrandr14_get_gpus( struct x11drv_gpu **new_gpus, int *count, BOOL ge if (!provider_resources->nproviders) { WARN("XRandR implementation doesn't report any providers, faking one.\n"); - lstrcpyW( gpus[0].name, wine_adapterW ); + gpus[0].name = strdup( "Wine Adapter" ); *new_gpus = gpus; *count = 1; ret = TRUE; @@ -834,8 +830,7 @@ static BOOL xrandr14_get_gpus( struct x11drv_gpu **new_gpus, int *count, BOOL ge if (get_properties) { if (!get_gpu_properties_from_vulkan( &gpus[i], provider_info, gpus, i )) - RtlUTF8ToUnicodeN( gpus[i].name, sizeof(gpus[i].name), &len, provider_info->name, - strlen( provider_info->name ) + 1 ); + gpus[i].name = strdup( provider_info->name ); /* FIXME: Add an alternate method of getting PCI IDs, for systems that don't support Vulkan */ } pXRRFreeProviderInfo( provider_info ); @@ -865,8 +860,9 @@ done: return ret; }
-static void xrandr14_free_gpus( struct x11drv_gpu *gpus ) +static void xrandr14_free_gpus( struct x11drv_gpu *gpus, int count ) { + while (count--) free( gpus[count].name ); free( gpus ); }
@@ -1266,7 +1262,7 @@ static BOOL xrandr14_get_id( const WCHAR *device_name, BOOL is_primary, x11drv_s new_current_mode_count += adapter_count; xrandr14_free_adapters( adapters ); } - xrandr14_free_gpus( gpus ); + xrandr14_free_gpus( gpus, gpu_count );
if (new_current_modes) { diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index 714db83e89c..a8680e2d758 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -245,14 +245,6 @@ struct pci_id UINT16 revision; };
-struct gdi_gpu -{ - WCHAR name[128]; - struct pci_id pci_id; - GUID vulkan_uuid; /* Vulkan device UUID */ - ULONGLONG memory_size; -}; - struct gdi_monitor { RECT rc_monitor; /* RcMonitor in MONITORINFO struct */ @@ -263,7 +255,7 @@ struct gdi_monitor
struct gdi_device_manager { - void (*add_gpu)( const struct gdi_gpu *gpu, void *param ); + void (*add_gpu)( const char *name, const struct pci_id *pci_id, const GUID *vulkan_uuid, ULONGLONG memory_size, void *param ); void (*add_source)( const char *name, UINT state_flags, void *param ); void (*add_monitor)( const struct gdi_monitor *monitor, void *param ); void (*add_modes)( const DEVMODEW *current, UINT modes_count, const DEVMODEW *modes, void *param );
From: Rémi Bernon rbernon@codeweavers.com
When no display cache update is needed. --- dlls/win32u/driver.c | 6 +++--- dlls/win32u/sysparams.c | 21 ++++++++++++--------- dlls/wineandroid.drv/init.c | 6 ++++-- dlls/winemac.drv/display.c | 8 ++++---- dlls/winemac.drv/macdrv.h | 2 +- dlls/winewayland.drv/display.c | 8 +++++--- dlls/winewayland.drv/waylanddrv.h | 2 +- dlls/winex11.drv/display.c | 11 +++++++---- dlls/winex11.drv/x11drv.h | 2 +- include/wine/gdi_driver.h | 2 +- 10 files changed, 39 insertions(+), 29 deletions(-)
diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c index e22a457d6d6..7c694d20a3c 100644 --- a/dlls/win32u/driver.c +++ b/dlls/win32u/driver.c @@ -761,9 +761,9 @@ static INT nulldrv_GetDisplayDepth( LPCWSTR name, BOOL is_primary ) return -1; /* use default implementation */ }
-static BOOL nulldrv_UpdateDisplayDevices( const struct gdi_device_manager *manager, BOOL force, void *param ) +static UINT nulldrv_UpdateDisplayDevices( const struct gdi_device_manager *manager, BOOL force, void *param ) { - return FALSE; + return STATUS_NOT_IMPLEMENTED; }
static BOOL nulldrv_CreateDesktop( const WCHAR *name, UINT width, UINT height ) @@ -1166,7 +1166,7 @@ static void loaderdrv_UpdateClipboard(void) load_driver()->pUpdateClipboard(); }
-static BOOL loaderdrv_UpdateDisplayDevices( const struct gdi_device_manager *manager, BOOL force, void *param ) +static UINT loaderdrv_UpdateDisplayDevices( const struct gdi_device_manager *manager, BOOL force, void *param ) { return load_driver()->pUpdateDisplayDevices( manager, force, param ); } diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 00bc7e0a6e1..88b9e7ef629 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -1885,7 +1885,7 @@ static BOOL add_virtual_source( struct device_manager_ctx *ctx ) if (!write_source_to_registry( &virtual_source, &ctx->source_key )) { WARN( "Failed to write source to registry\n" ); - return FALSE; + return STATUS_UNSUCCESSFUL; }
ctx->source = virtual_source; @@ -1913,18 +1913,21 @@ static BOOL add_virtual_source( struct device_manager_ctx *ctx ) add_monitor( &monitor, ctx ); add_virtual_modes( ctx, ¤t, &initial, &maximum );
- return TRUE; + return STATUS_SUCCESS; }
-static BOOL update_display_devices( BOOL force, struct device_manager_ctx *ctx ) +static UINT update_display_devices( BOOL force, struct device_manager_ctx *ctx ) { - if (user_driver->pUpdateDisplayDevices( &device_manager, force, ctx )) + UINT status; + + if (!(status = user_driver->pUpdateDisplayDevices( &device_manager, force, ctx ))) { if (ctx->source_count && is_virtual_desktop()) return add_virtual_source( ctx ); - return TRUE; + return status; }
- return default_update_display_devices( force, ctx ); + if (status == STATUS_NOT_IMPLEMENTED) return default_update_display_devices( force, ctx ); + return status; }
BOOL update_display_cache( BOOL force ) @@ -1933,7 +1936,7 @@ BOOL update_display_cache( BOOL force ) {'_','_','w','i','n','e','s','e','r','v','i','c','e','_','w','i','n','s','t','a','t','i','o','n',0}; HWINSTA winstation = NtUserGetProcessWindowStation(); struct device_manager_ctx ctx = {0}; - BOOL ret; + UINT status; WCHAR name[MAX_PATH];
/* services do not have any adapters, only a virtual monitor */ @@ -1947,10 +1950,10 @@ BOOL update_display_cache( BOOL force ) return TRUE; }
- ret = update_display_devices( force, &ctx ); + status = update_display_devices( force, &ctx );
release_display_manager_ctx( &ctx ); - if (!ret) WARN( "Failed to update display devices\n" ); + if (status && status != STATUS_ALREADY_COMPLETE) WARN( "Failed to update display devices, status %#x\n", status );
if (!update_display_cache_from_registry()) { diff --git a/dlls/wineandroid.drv/init.c b/dlls/wineandroid.drv/init.c index 264bd6a7908..c8d997b7aa4 100644 --- a/dlls/wineandroid.drv/init.c +++ b/dlls/wineandroid.drv/init.c @@ -269,7 +269,7 @@ LONG ANDROID_ChangeDisplaySettings( LPDEVMODEW displays, LPCWSTR primary_name, H /*********************************************************************** * ANDROID_UpdateDisplayDevices */ -BOOL ANDROID_UpdateDisplayDevices( const struct gdi_device_manager *device_manager, BOOL force, void *param ) +UINT ANDROID_UpdateDisplayDevices( const struct gdi_device_manager *device_manager, BOOL force, void *param ) { if (force || force_display_devices_refresh) { @@ -295,9 +295,11 @@ BOOL ANDROID_UpdateDisplayDevices( const struct gdi_device_manager *device_manag current.dmFields |= DM_POSITION; device_manager->add_modes( ¤t, 1, &mode, param ); force_display_devices_refresh = FALSE; + + return STATUS_SUCCESS; }
- return TRUE; + return STATUS_ALREADY_COMPLETE; }
diff --git a/dlls/winemac.drv/display.c b/dlls/winemac.drv/display.c index 78019d43de9..edf740b260e 100644 --- a/dlls/winemac.drv/display.c +++ b/dlls/winemac.drv/display.c @@ -1110,7 +1110,7 @@ static BOOL is_same_devmode(const DEVMODEW *a, const DEVMODEW *b) a->dmDisplayFrequency == b->dmDisplayFrequency; }
-BOOL macdrv_UpdateDisplayDevices( const struct gdi_device_manager *device_manager, BOOL force, void *param ) +UINT macdrv_UpdateDisplayDevices( const struct gdi_device_manager *device_manager, BOOL force, void *param ) { struct macdrv_adapter *adapters, *adapter; struct macdrv_monitor *monitors, *monitor; @@ -1120,7 +1120,7 @@ BOOL macdrv_UpdateDisplayDevices( const struct gdi_device_manager *device_manage DEVMODEW *mode, *modes; DWORD len;
- if (!force && !force_display_devices_refresh) return TRUE; + if (!force && !force_display_devices_refresh) return STATUS_ALREADY_COMPLETE; force_display_devices_refresh = FALSE;
if (macdrv_get_displays(&displays, &display_count)) @@ -1133,7 +1133,7 @@ BOOL macdrv_UpdateDisplayDevices( const struct gdi_device_manager *device_manage if (macdrv_get_gpus(&gpus, &gpu_count)) { ERR("could not get GPUs\n"); - return FALSE; + return STATUS_UNSUCCESSFUL; } TRACE("GPU count: %d\n", gpu_count);
@@ -1198,7 +1198,7 @@ BOOL macdrv_UpdateDisplayDevices( const struct gdi_device_manager *device_manage
macdrv_free_gpus(gpus); macdrv_free_displays(displays); - return TRUE; + return STATUS_SUCCESS; }
/*********************************************************************** diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index b8d54222a47..19efc4dc7d4 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -129,7 +129,7 @@ static inline RECT rect_from_cgrect(CGRect cgrect) extern BOOL macdrv_GetCurrentDisplaySettings(LPCWSTR name, BOOL is_primary, LPDEVMODEW devmode); extern INT macdrv_GetDisplayDepth(LPCWSTR name, BOOL is_primary); extern LRESULT macdrv_ClipboardWindowProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp); -extern BOOL macdrv_UpdateDisplayDevices( const struct gdi_device_manager *device_manager, +extern UINT macdrv_UpdateDisplayDevices( const struct gdi_device_manager *device_manager, BOOL force, void *param ); extern BOOL macdrv_GetDeviceGammaRamp(PHYSDEV dev, LPVOID ramp); extern BOOL macdrv_SetDeviceGammaRamp(PHYSDEV dev, LPVOID ramp); diff --git a/dlls/winewayland.drv/display.c b/dlls/winewayland.drv/display.c index ffe46117191..ec5b825ed76 100644 --- a/dlls/winewayland.drv/display.c +++ b/dlls/winewayland.drv/display.c @@ -24,6 +24,8 @@
#include "config.h"
+#include "ntstatus.h" +#define WIN32_NO_STATUS #include "waylanddrv.h"
#include "wine/debug.h" @@ -275,7 +277,7 @@ static void wayland_add_device_modes(const struct gdi_device_manager *device_man /*********************************************************************** * UpdateDisplayDevices (WAYLAND.@) */ -BOOL WAYLAND_UpdateDisplayDevices(const struct gdi_device_manager *device_manager, +UINT WAYLAND_UpdateDisplayDevices(const struct gdi_device_manager *device_manager, BOOL force, void *param) { struct wayland_output *output; @@ -283,7 +285,7 @@ BOOL WAYLAND_UpdateDisplayDevices(const struct gdi_device_manager *device_manage struct wl_array output_info_array; struct output_info *output_info;
- if (!force && !force_display_devices_refresh) return TRUE; + if (!force && !force_display_devices_refresh) return STATUS_ALREADY_COMPLETE;
TRACE("force=%d force_refresh=%d\n", force, force_display_devices_refresh);
@@ -318,5 +320,5 @@ BOOL WAYLAND_UpdateDisplayDevices(const struct gdi_device_manager *device_manage
pthread_mutex_unlock(&process_wayland.output_mutex);
- return TRUE; + return STATUS_SUCCESS; } diff --git a/dlls/winewayland.drv/waylanddrv.h b/dlls/winewayland.drv/waylanddrv.h index 595a2e64430..7852c23b690 100644 --- a/dlls/winewayland.drv/waylanddrv.h +++ b/dlls/winewayland.drv/waylanddrv.h @@ -332,7 +332,7 @@ void WAYLAND_DestroyWindow(HWND hwnd); void WAYLAND_SetCursor(HWND hwnd, HCURSOR hcursor); void WAYLAND_SetWindowText(HWND hwnd, LPCWSTR text); LRESULT WAYLAND_SysCommand(HWND hwnd, WPARAM wparam, LPARAM lparam); -BOOL WAYLAND_UpdateDisplayDevices(const struct gdi_device_manager *device_manager, +UINT WAYLAND_UpdateDisplayDevices(const struct gdi_device_manager *device_manager, BOOL force, void *param); LRESULT WAYLAND_WindowMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp); void WAYLAND_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags, diff --git a/dlls/winex11.drv/display.c b/dlls/winex11.drv/display.c index bfee95b6642..19466225bc8 100644 --- a/dlls/winex11.drv/display.c +++ b/dlls/winex11.drv/display.c @@ -23,6 +23,9 @@ #endif
#include "config.h" + +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "x11drv.h" #include "wine/debug.h"
@@ -494,7 +497,7 @@ BOOL X11DRV_DisplayDevices_SupportEventHandlers(void)
static BOOL force_display_devices_refresh;
-BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manager, BOOL force, void *param ) +UINT X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manager, BOOL force, void *param ) { struct x11drv_adapter *adapters; struct gdi_monitor *monitors; @@ -504,13 +507,13 @@ BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manage DEVMODEW *modes; UINT mode_count;
- if (!force && !force_display_devices_refresh) return TRUE; + if (!force && !force_display_devices_refresh) return STATUS_ALREADY_COMPLETE; force_display_devices_refresh = FALSE;
TRACE( "via %s\n", debugstr_a(host_handler.name) );
/* Initialize GPUs */ - if (!host_handler.get_gpus( &gpus, &gpu_count, TRUE )) return FALSE; + if (!host_handler.get_gpus( &gpus, &gpu_count, TRUE )) return STATUS_UNSUCCESSFUL; TRACE("GPU count: %d\n", gpu_count);
for (gpu = 0; gpu < gpu_count; gpu++) @@ -559,7 +562,7 @@ BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manage }
host_handler.free_gpus( gpus, gpu_count ); - return TRUE; + return STATUS_SUCCESS; }
void X11DRV_DisplayDevices_Init(BOOL force) diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index d8d5622abfd..a0f63e10147 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -217,7 +217,7 @@ extern BOOL X11DRV_SystrayDockRemove( HWND hwnd ); extern LONG X11DRV_ChangeDisplaySettings( LPDEVMODEW displays, LPCWSTR primary_name, HWND hwnd, DWORD flags, LPVOID lpvoid ); extern BOOL X11DRV_GetCurrentDisplaySettings( LPCWSTR name, BOOL is_primary, LPDEVMODEW devmode ); extern INT X11DRV_GetDisplayDepth( LPCWSTR name, BOOL is_primary ); -extern BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manager, +extern UINT X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manager, BOOL force, void *param ); extern BOOL X11DRV_CreateDesktop( const WCHAR *name, UINT width, UINT height ); extern BOOL X11DRV_CreateWindow( HWND hwnd ); diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index a8680e2d758..c299dc2ae42 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -306,7 +306,7 @@ struct user_driver_funcs LONG (*pChangeDisplaySettings)(LPDEVMODEW,LPCWSTR,HWND,DWORD,LPVOID); BOOL (*pGetCurrentDisplaySettings)(LPCWSTR,BOOL,LPDEVMODEW); INT (*pGetDisplayDepth)(LPCWSTR,BOOL); - BOOL (*pUpdateDisplayDevices)(const struct gdi_device_manager *,BOOL,void*); + UINT (*pUpdateDisplayDevices)(const struct gdi_device_manager *,BOOL,void*); /* windowing functions */ BOOL (*pCreateDesktop)(const WCHAR *,UINT,UINT); BOOL (*pCreateWindow)(HWND);
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=145349
Your paranoid android.
=== debian11b (64 bit WoW report) ===
wmvcore: wmvcore.c:2831: Test failed: Got pts 4060000. wmvcore.c:2843: Test failed: Got pts 4180000. wmvcore.c:2850: Test failed: Got pts 4060000. wmvcore.c:2862: Test failed: Got pts 4180000.
Zhiyi Zhang (@zhiyi) commented about dlls/winewayland.drv/display.c:
static void wayland_add_device_gpu(const struct gdi_device_manager *device_manager, void *param) {
- static const WCHAR wayland_gpuW[] = {'W','a','y','l','a','n','d','G','P','U',0};
- struct gdi_gpu gpu = {0};
- lstrcpyW(gpu.name, wayland_gpuW);
- struct pci_id pci_id = {0};
- TRACE("name=%s\n", wine_dbgstr_w(gpu.name));
- TRACE("\n");
- device_manager->add_gpu(&gpu, param);
- device_manager->add_gpu("WaylandGPU", &pci_id, NULL, 0, param);
It seems there should be a space in between "Wayland" and "GPU"
Zhiyi Zhang (@zhiyi) commented about dlls/winex11.drv/xinerama.c:
if (!gpus) return FALSE;
- lstrcpyW( gpus[0].name, wine_adapterW );
- gpus[0].name = strdup( "Wine Adapter" );
Let's replace it with "Wine GPU" for consistency. Same for other similar occurrences.