From 3ef0bee4e036abfa10d8a41ddf3db898e774d200 Mon Sep 17 00:00:00 2001 From: km7dev <100500023+Kingminer7@users.noreply.github.com> Date: Sun, 25 Oct 2026 11:22:56 -0400 Subject: [PATCH] some compilation fixes and fix some touch offsetting --- src/backend.cpp | 12 +++++++++--- src/pages/Memory.cpp | 3 ++- src/platform/utils.hpp | 1 + 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/backend.cpp b/src/backend.cpp index c2b7ff1..06922bd 100644 --- a/src/backend.cpp +++ b/src/backend.cpp @@ -427,6 +427,7 @@ class $modify(CCTouchDispatcher) { io.AddMouseButtonEvent(0, false); } if (!DevTools::get()->shouldUseGDWindow() || !DevTools::get()->shouldPopGame()) { + touchFromGD() = false; CCTouchDispatcher::touches(touches, event, type); } } @@ -525,6 +526,12 @@ ImGuiKey cocosToImGuiKey(cocos2d::enumKeyCodes key) { c = static_cast('0' + (data.key - KEY_Zero)); } else if (data.key == KEY_Space) { c = ' '; + } else if (data.key == KEY_OEMPeriod) { + c = '.'; + } else if (data.key == KEY_OEMComma) { + c = ','; + } else if (data.key == KEY_OEMMinus) { + c = '-'; } if (c != 0) { @@ -532,9 +539,8 @@ ImGuiKey cocosToImGuiKey(cocos2d::enumKeyCodes key) { io.AddInputCharactersUTF8(str.c_str()); } } - if (data.key == KEY_Backspace) { - io.AddKeyEvent(ImGuiKey_Backspace, true); - io.AddKeyEvent(ImGuiKey_Backspace, false); + if (data.key == KEY_Backspace && data.action != KeyboardInputData::Action::Repeat) { + io.AddKeyEvent(ImGuiKey_Backspace, data.action == KeyboardInputData::Action::Press); } #endif diff --git a/src/pages/Memory.cpp b/src/pages/Memory.cpp index 99fc1f1..b946714 100644 --- a/src/pages/Memory.cpp +++ b/src/pages/Memory.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -257,7 +258,7 @@ std::optional findStdString(SafePtr ptr) { data = reinterpret_cast(ptr.read_ptr().as_ptr()); } #elif defined(GEODE_IS_ANDROID) - static gd::string emptyStdString; + static std::string emptyStdString; auto internalData = ptr.read_ptr(); if (!internalData.addr) return {}; auto size = (internalData - (3 * sizeof(void*))).read(); diff --git a/src/platform/utils.hpp b/src/platform/utils.hpp index 11c17e9..f4948f1 100644 --- a/src/platform/utils.hpp +++ b/src/platform/utils.hpp @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include