From 1cc22101852e660f31a4d98268956554793dad41 Mon Sep 17 00:00:00 2001 From: sonninnos <45124675+sonninnos@users.noreply.github.com> Date: Sun, 29 Sep 2024 21:12:12 +0300 Subject: [PATCH] Vulkan: Negative viewport position correction (#17063) --- gfx/drivers/vulkan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 905790a730..9641356a03 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -3862,14 +3862,14 @@ static void vulkan_set_viewport(void *data, unsigned viewport_width, if (vk->vp.x < 0) { - vk->translate_x = (float)vk->vp.x; + vk->translate_x = (float)vk->vp.x * 2; vk->vp.x = 0.0; } else vk->translate_x = 0.0; if (vk->vp.y < 0) { - vk->translate_y = (float)vk->vp.y; + vk->translate_y = (float)vk->vp.y * 2; vk->vp.y = 0.0; } else