From bc2b573053a1c3ae14dc53afbee036d98a8fb435 Mon Sep 17 00:00:00 2001 From: SSimco <37044560+SSimco@users.noreply.github.com> Date: Sat, 21 Sep 2024 21:56:35 +0300 Subject: [PATCH] Fixed key text not showing --- src/Cemu/GuiSystem/GuiSystem.cpp | 2 +- src/gui/CemuApp.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Cemu/GuiSystem/GuiSystem.cpp b/src/Cemu/GuiSystem/GuiSystem.cpp index 2d2ce5f5..051675d3 100644 --- a/src/Cemu/GuiSystem/GuiSystem.cpp +++ b/src/Cemu/GuiSystem/GuiSystem.cpp @@ -14,7 +14,7 @@ void unregisterKeyCodeToStringCallback() std::string keyCodeToString(uint32 key) { if (!s_key_code_to_string) - return ""; + return fmt::format("key {}", key); return s_key_code_to_string(key); } diff --git a/src/gui/CemuApp.cpp b/src/gui/CemuApp.cpp index 040b0b75..b62c389a 100644 --- a/src/gui/CemuApp.cpp +++ b/src/gui/CemuApp.cpp @@ -82,7 +82,6 @@ void CemuApp::DeterminePaths(std::set& failedWriteAccess) // for Windo { std::error_code ec; bool isPortable = false; - GuiSystem::registerKeyCodeToStringCallback(rawKeyCodeToString); fs::path user_data_path, config_path, cache_path, data_path; auto standardPaths = wxStandardPaths::Get(); fs::path exePath(wxHelper::MakeFSPath(standardPaths.GetExecutablePath())); @@ -238,6 +237,7 @@ void CemuApp::InitializeExistingMLCOrFail(fs::path mlc) bool CemuApp::OnInit() { + GuiSystem::registerKeyCodeToStringCallback(rawKeyCodeToString); #if __WXGTK__ GTKSuppressDiagnostics(G_LOG_LEVEL_MASK & ~G_LOG_FLAG_FATAL); #endif