Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/wined3d/adapter_vk.c | 2 ++ dlls/wined3d/directx.c | 4 ++++ 2 files changed, 6 insertions(+)
diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index f648dd196f7..b122982bc13 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -2198,6 +2198,8 @@ static BOOL wined3d_adapter_vk_init(struct wined3d_adapter_vk *adapter_vk,
memcpy(&adapter->driver_uuid, id_properties.driverUUID, sizeof(adapter->driver_uuid)); memcpy(&adapter->device_uuid, id_properties.deviceUUID, sizeof(adapter->device_uuid)); + if (id_properties.deviceLUIDValid) + memcpy(&adapter->luid, id_properties.deviceLUID, sizeof(adapter->luid));
if (!wined3d_adapter_vk_init_format_info(adapter_vk, vk_info)) goto fail; diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index a9a5a3aac36..fd618303e1e 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2965,6 +2965,10 @@ static BOOL wined3d_adapter_init_luid(struct wined3d_adapter *adapter) D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME open_adapter_param; D3DKMT_CLOSEADAPTER close_adapter_param;
+ /* Already initialised */ + if (adapter->luid.LowPart || adapter->luid.HighPart) + return TRUE; + if (!get_primary_display(open_adapter_param.DeviceName)) return FALSE;