Merge pull request #7857 from myfreeweb/wayland-hidpi-resize

Wayland: unbreak Vulkan after fixing HiDPI resizing
This commit is contained in:
Twinaphex 2019-01-01 00:55:00 +01:00 committed by GitHub
commit 1520f022c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1058,8 +1058,8 @@ static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height)
break; break;
case GFX_CTX_VULKAN_API: case GFX_CTX_VULKAN_API:
#ifdef HAVE_VULKAN #ifdef HAVE_VULKAN
wl->width = width; wl->width = width / wl->buffer_scale;
wl->height = height; wl->height = height / wl->buffer_scale;
if (vulkan_create_swapchain(&wl->vk, width, height, wl->swap_interval)) if (vulkan_create_swapchain(&wl->vk, width, height, wl->swap_interval))
{ {
@ -1618,7 +1618,7 @@ static bool gfx_ctx_wl_set_video_mode(void *data,
#ifdef HAVE_VULKAN #ifdef HAVE_VULKAN
if (!vulkan_surface_create(&wl->vk, VULKAN_WSI_WAYLAND, if (!vulkan_surface_create(&wl->vk, VULKAN_WSI_WAYLAND,
wl->input.dpy, wl->surface, wl->input.dpy, wl->surface,
wl->width, wl->height, wl->swap_interval)) wl->width * wl->buffer_scale, wl->height * wl->buffer_scale, wl->swap_interval))
goto error; goto error;
#endif #endif
break; break;