From 6814ad45d45406c2d2f1cc26360026aa58cc6cf2 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 2 Dec 2020 16:14:15 +0100 Subject: [PATCH] [hud] Fix positioning of compiler item when scaled --- src/dxvk/hud/dxvk_hud_item.cpp | 2 +- src/dxvk/hud/dxvk_hud_renderer.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dxvk/hud/dxvk_hud_item.cpp b/src/dxvk/hud/dxvk_hud_item.cpp index 878a761a3..ec3de389b 100644 --- a/src/dxvk/hud/dxvk_hud_item.cpp +++ b/src/dxvk/hud/dxvk_hud_item.cpp @@ -594,7 +594,7 @@ namespace dxvk::hud { HudPos position) { if (m_show) { renderer.drawText(16.0f, - { position.x, renderer.surfaceSize().height - 20.0f }, + { position.x, renderer.surfaceSize().height / renderer.scale() - 20.0f }, { 1.0f, 1.0f, 1.0f, 1.0f }, "Compiling shaders..."); } diff --git a/src/dxvk/hud/dxvk_hud_renderer.h b/src/dxvk/hud/dxvk_hud_renderer.h index 12080424b..c5b8e1da5 100644 --- a/src/dxvk/hud/dxvk_hud_renderer.h +++ b/src/dxvk/hud/dxvk_hud_renderer.h @@ -109,6 +109,10 @@ namespace dxvk::hud { VkExtent2D surfaceSize() const { return m_surfaceSize; } + + float scale() const { + return m_scale; + } private: