From c6b44cd5d7ddbf8973747b7a415d8ecd4007ee4f Mon Sep 17 00:00:00 2001 From: Nemoumbra Date: Fri, 24 Feb 2023 23:44:32 +0300 Subject: [PATCH 1/2] Update gitignore --- Windows/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/Windows/.gitignore b/Windows/.gitignore index 653ef6879efa..8d4dba11ef29 100644 --- a/Windows/.gitignore +++ b/Windows/.gitignore @@ -1,3 +1,4 @@ *.VC.VC.opendb *.VC.db +*.txt enc_temp_folder From aab4a3034c4f611d47dd7250c6ec7e6774dc2515 Mon Sep 17 00:00:00 2001 From: Nemoumbra Date: Fri, 24 Feb 2023 23:13:48 +0300 Subject: [PATCH 2/2] Added new MainWindow menu item "copy PSP memory base pointer" --- Windows/MainWindowMenu.cpp | 8 ++++++++ Windows/ppsspp.rc | 1 + Windows/resource.h | 1 + 3 files changed, 10 insertions(+) diff --git a/Windows/MainWindowMenu.cpp b/Windows/MainWindowMenu.cpp index ee15fab63b0e..022e1e70ccca 100644 --- a/Windows/MainWindowMenu.cpp +++ b/Windows/MainWindowMenu.cpp @@ -91,6 +91,7 @@ namespace MainWindow { EnableMenuItem(menu, ID_DEBUG_TAKESCREENSHOT, menuEnable); EnableMenuItem(menu, ID_DEBUG_SHOWDEBUGSTATISTICS, menuInGameEnable); EnableMenuItem(menu, ID_DEBUG_EXTRACTFILE, menuEnable); + EnableMenuItem(menu, ID_DEBUG_MEMORYBASE, menuInGameEnable); // While playing, this pop up doesn't work - and probably doesn't make sense. EnableMenuItem(menu, ID_OPTIONS_LANGUAGE, state == UISTATE_INGAME ? MF_GRAYED : MF_ENABLED); @@ -221,6 +222,7 @@ namespace MainWindow { TranslateMenuItem(menu, ID_DEBUG_GEDEBUGGER, g_Config.bSystemControls ? L"\tCtrl+G" : L""); TranslateMenuItem(menu, ID_DEBUG_EXTRACTFILE); TranslateMenuItem(menu, ID_DEBUG_LOG, g_Config.bSystemControls ? L"\tCtrl+L" : L""); + TranslateMenuItem(menu, ID_DEBUG_MEMORYBASE); TranslateMenuItem(menu, ID_DEBUG_MEMORYVIEW, g_Config.bSystemControls ? L"\tCtrl+M" : L""); // Options menu @@ -822,6 +824,12 @@ namespace MainWindow { memoryWindow->Show(true); break; + case ID_DEBUG_MEMORYBASE: + { + W32Util::CopyTextToClipboard(hWnd, ConvertUTF8ToWString(StringFromFormat("%016llx", (uintptr_t)Memory::base))); + break; + } + case ID_DEBUG_EXTRACTFILE: { std::string filename; diff --git a/Windows/ppsspp.rc b/Windows/ppsspp.rc index b54744391396..d5109b9cd085 100644 --- a/Windows/ppsspp.rc +++ b/Windows/ppsspp.rc @@ -537,6 +537,7 @@ BEGIN MENUITEM "GE Debugger...", ID_DEBUG_GEDEBUGGER MENUITEM "Extract File...", ID_DEBUG_EXTRACTFILE MENUITEM "Log Console", ID_DEBUG_LOG + MENUITEM "Copy PSP memory base pointer", ID_DEBUG_MEMORYBASE MENUITEM "Memory View...", ID_DEBUG_MEMORYVIEW END diff --git a/Windows/resource.h b/Windows/resource.h index 66ec982d23e8..fc421b7e602e 100644 --- a/Windows/resource.h +++ b/Windows/resource.h @@ -18,6 +18,7 @@ #define ID_DEBUG_DISASSEMBLY 119 #define WHEEL_DELTA 120 #define ID_DEBUG_LOG 121 +#define ID_DEBUG_MEMORYBASE 122 #define ID_FILE_OPEN_NEW_INSTANCE 123 #define ID_FILE_LOADSTATEFILE 126 #define ID_FILE_SAVESTATEFILE 127