From f62fd3e7f56cf7d17db3bf0925c4423f20085bc4 Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Thu, 2 Nov 2023 20:44:45 -0400 Subject: [PATCH] Fix Touch In WASM --- platforms/sdl/CMakeLists.txt | 1 + source/client/app/Minecraft.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/platforms/sdl/CMakeLists.txt b/platforms/sdl/CMakeLists.txt index 4d34dcf..56f076f 100644 --- a/platforms/sdl/CMakeLists.txt +++ b/platforms/sdl/CMakeLists.txt @@ -13,6 +13,7 @@ if(EMSCRIPTEN) add_link_options(${ARGV}) endfunction() set(CMAKE_EXECUTABLE_SUFFIX ".js") + add_link_options("$<$:-gsource-map>") endif() # Clang diff --git a/source/client/app/Minecraft.cpp b/source/client/app/Minecraft.cpp index 256a124..a84263f 100644 --- a/source/client/app/Minecraft.cpp +++ b/source/client/app/Minecraft.cpp @@ -950,7 +950,7 @@ void Minecraft::sizeUpdate(int newWidth, int newHeight) m_pScreen->setSize(int(Minecraft::width * Gui::InvGuiScale), int(Minecraft::height * Gui::InvGuiScale)); if (m_pInputHolder) - m_pInputHolder->setScreenSize(newWidth, newHeight); + m_pInputHolder->setScreenSize(newWidth * guiScaleMultiplier, newHeight * guiScaleMultiplier); } float Minecraft::getBestScaleForThisScreenSize(int width, int height)