From b908213041dd98df9464d52f427d9ebd3b33edd3 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Mon, 24 Jan 2022 16:33:28 +0300 Subject: [PATCH] wineopenxr: Set Unix __WINE_OPENXR_VK_DEVICE_EXTENSIONS env var instead of Windows. CW-Bug-Id: #20036 That is read in the winevulkan's Unix part with getenv() now. --- wineopenxr/openxr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wineopenxr/openxr.c b/wineopenxr/openxr.c index 86a5a741..579ac43e 100644 --- a/wineopenxr/openxr.c +++ b/wineopenxr/openxr.c @@ -1592,7 +1592,7 @@ XrResult WINAPI wine_xrGetVulkanDeviceExtensionsKHR(XrInstance instance, XrSyste } WINE_TRACE("got device extensions: %s\n", buf); - SetEnvironmentVariableA(WINE_VULKAN_DEVICE_VARIABLE, buf); + setenv(WINE_VULKAN_DEVICE_VARIABLE, buf, 1); heap_free(buf); @@ -2274,7 +2274,8 @@ XrResult WINAPI __wineopenxr_GetVulkanDeviceExtensions(uint32_t buflen, uint32_t return XR_SUCCESS; } - SetEnvironmentVariableA(WINE_VULKAN_DEVICE_VARIABLE, g_device_extensions); + WINE_TRACE("g_device_extensions %s.\n", g_device_extensions); + setenv(WINE_VULKAN_DEVICE_VARIABLE, g_device_extensions, 1); *outlen = strlen(WINE_VULKAN_DEVICE_EXTENSION_NAME) + 1; strcpy(buf, WINE_VULKAN_DEVICE_EXTENSION_NAME);