From 654c6e4720d75d564f866342455011d4b2562e4e Mon Sep 17 00:00:00 2001 From: Li Jin Date: Wed, 5 Jun 2024 10:21:51 +0800 Subject: [PATCH] fix ImGui setting file path. [skip CI] --- Source/GUI/ImGuiDora.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/GUI/ImGuiDora.cpp b/Source/GUI/ImGuiDora.cpp index efaabf909..d2c484667 100644 --- a/Source/GUI/ImGuiDora.cpp +++ b/Source/GUI/ImGuiDora.cpp @@ -1213,7 +1213,7 @@ bool ImGuiDora::init() { io.SetPlatformImeDataFn = SetPlatformImeDataFn; io.ClipboardUserData = nullptr; - _iniFilePath = SharedContent.getWritablePath() + "imgui.ini"; + _iniFilePath = Path::concat({SharedContent.getWritablePath(), "imgui.ini"sv}); io.IniFilename = _iniFilePath.c_str(); _sampler = bgfx::createUniform("s_texColor", bgfx::UniformType::Sampler); @@ -1471,8 +1471,7 @@ void ImGuiDora::handleEvent(const SDL_Event& event) { Size winSize = SharedApplication.getWinSize(); ImGui::GetIO().AddMousePosEvent( s_cast(event.motion.x) * visualSize.width / winSize.width, - s_cast(event.motion.y) * visualSize.height / winSize.height - ); + s_cast(event.motion.y) * visualSize.height / winSize.height); break; } case SDL_KEYDOWN: