Module: wine Branch: master Commit: 46bc42e7a7c9bb6bfdee701c9f5c1742041cfc36 URL: https://source.winehq.org/git/wine.git/?a=commit;h=46bc42e7a7c9bb6bfdee701c9...
Author: Józef Kucia jkucia@codeweavers.com Date: Thu Mar 29 14:53:54 2018 +0200
winevulkan: Simplify wine_vk_init().
Signed-off-by: Józef Kucia jkucia@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/winevulkan/vulkan.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index 5f67444..9fa1d39 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -47,7 +47,7 @@ struct wine_vk_structure_header
static void *wine_vk_get_global_proc_addr(const char *name);
-static const struct vulkan_funcs *vk_funcs = NULL; +static const struct vulkan_funcs *vk_funcs;
static void wine_vk_physical_device_free(struct VkPhysicalDevice_T *phys_dev) { @@ -261,17 +261,17 @@ static void wine_vk_device_free(struct VkDevice_T *device)
static BOOL wine_vk_init(void) { - HDC hdc = GetDC(0); + HDC hdc;
- vk_funcs = __wine_get_vulkan_driver(hdc, WINE_VULKAN_DRIVER_VERSION); + hdc = GetDC(0); + vk_funcs = __wine_get_vulkan_driver(hdc, WINE_VULKAN_DRIVER_VERSION); + ReleaseDC(0, hdc); if (!vk_funcs) { ERR("Failed to load Wine graphics driver supporting Vulkan.\n"); - ReleaseDC(0, hdc); return FALSE; }
- ReleaseDC(0, hdc); return TRUE; }