From aebdb93ebd28e52e9ab60740ab1527a5cdc156af Mon Sep 17 00:00:00 2001 From: Nayla Hanegan Date: Sun, 16 Jun 2024 20:18:45 -0400 Subject: [PATCH] codehandler gecko code log --- Source/Core/Core/GeckoCode.cpp | 10 ++++++++++ Source/Core/UICommon/AutoUpdate.cpp | 9 --------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Source/Core/Core/GeckoCode.cpp b/Source/Core/Core/GeckoCode.cpp index 454308c1ba..9890843db9 100644 --- a/Source/Core/Core/GeckoCode.cpp +++ b/Source/Core/Core/GeckoCode.cpp @@ -23,6 +23,8 @@ #include "ConfigManager.h" #include "Config/MainSettings.h" +#include "VideoCommon/OnScreenDisplay.h" + namespace Gecko { static constexpr u32 CODE_SIZE = 8; @@ -191,6 +193,11 @@ static Installation InstallCodeHandlerLocked(const Core::CPUThreadGuard& guard) "not write: \"{}\". Need {} bytes, only {} remain.", active_code.name, active_code.codes.size() * CODE_SIZE, end_address - next_address); + OSD::AddMessage(fmt::format("Too many GeckoCodes! Ran out of storage space in Game RAM. Could " + "not write: \"{}\". Need {} bytes, only {} remain.", + active_code.name, active_code.codes.size() * CODE_SIZE, + end_address - next_address), + OSD::Duration::VERY_LONG); continue; } @@ -205,6 +212,9 @@ static Installation InstallCodeHandlerLocked(const Core::CPUThreadGuard& guard) WARN_LOG_FMT(ACTIONREPLAY, "GeckoCodes: Using {} of {} bytes", next_address - start_address, end_address - start_address); + OSD::AddMessage(fmt::format("Gecko Codes: Using {} of {} bytes", next_address - start_address, + end_address - start_address)); + // Stop code. Tells the handler that this is the end of the list. PowerPC::MMU::HostWrite_U32(guard, 0xF0000000, next_address); PowerPC::MMU::HostWrite_U32(guard, 0x00000000, next_address + 4); diff --git a/Source/Core/UICommon/AutoUpdate.cpp b/Source/Core/UICommon/AutoUpdate.cpp index c0f3acb66e..3d7abe56c7 100644 --- a/Source/Core/UICommon/AutoUpdate.cpp +++ b/Source/Core/UICommon/AutoUpdate.cpp @@ -158,15 +158,6 @@ static std::string GetUpdateServerUrl() return "https://dolphin-emu.org"; } -static u32 GetOwnProcessId() -{ -#ifdef _WIN32 - return GetCurrentProcessId(); -#else - return getpid(); -#endif -} - void AutoUpdateChecker::CheckForUpdate(std::string_view update_track, std::string_view hash_override, const CheckType check_type) {