From 440474d2eeacf31777492e924b4600a1812f13e8 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Sun, 9 Jun 2019 06:19:54 -0400 Subject: [PATCH] small fixes --- GUI/mainwindow.cpp | 4 ++-- text.cpp | 2 +- texthook/engine/engine.cc | 2 +- texthook/engine/match64.cc | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/GUI/mainwindow.cpp b/GUI/mainwindow.cpp index eae35a8..42b35ee 100644 --- a/GUI/mainwindow.cpp +++ b/GUI/mainwindow.cpp @@ -27,7 +27,7 @@ extern const char* ATTACH_INFO; extern const char* SEARCH_GAME; extern const char* PROCESSES; extern const char* CODE_INFODUMP; -extern const char* HOOH_SEARCH_UNSTABLE_WARNING; +extern const char* HOOK_SEARCH_UNSTABLE_WARNING; extern const char* SEARCH_PATTERN; extern const char* SEARCH_DURATION; extern const char* PATTERN_OFFSET; @@ -331,7 +331,7 @@ void MainWindow::SaveHooks() void MainWindow::FindHooks() { - QMessageBox::information(this, FIND_HOOKS, HOOH_SEARCH_UNSTABLE_WARNING); + QMessageBox::information(this, FIND_HOOKS, HOOK_SEARCH_UNSTABLE_WARNING); struct : QDialog { using QDialog::QDialog; diff --git a/text.cpp b/text.cpp index f745bc3..383a43b 100644 --- a/text.cpp +++ b/text.cpp @@ -49,7 +49,7 @@ const char* INVALID_EXTENSION = u8"%1 is an invalid extension"; const char* CONFIRM_EXTENSION_OVERWRITE = u8"Another version of this extension already exists, do you want to delete and overwrite it?"; const char* EXTENSION_WRITE_ERROR = u8"Failed to save extension"; const char* USE_JP_LOCALE = u8"Emulate japanese locale?"; -const char* HOOH_SEARCH_UNSTABLE_WARNING = u8"Searching for hooks is unstable! Be prepared for your game to crash!"; +const char* HOOK_SEARCH_UNSTABLE_WARNING = u8"Searching for hooks is unstable! Be prepared for your game to crash!"; const char* SEARCH_PATTERN = u8"Search pattern (hex byte array)"; const char* SEARCH_DURATION = u8"Search duration (ms)"; const char* PATTERN_OFFSET = u8"Offset from pattern start"; diff --git a/texthook/engine/engine.cc b/texthook/engine/engine.cc index 1e1fc56..9af1b9c 100644 --- a/texthook/engine/engine.cc +++ b/texthook/engine/engine.cc @@ -16829,7 +16829,7 @@ bool FindPPSSPP() if (info.RegionSize == 0x1f00000 && info.Protect == PAGE_READWRITE && info.Type == MEM_MAPPED) { found = true; - ConsoleOutput("Textractor: PPSSPP memory found: use pattern 79 0F C7 85 and pattern offset 0 and string offset %p to search for hooks", probe - 0x8000000); + ConsoleOutput("Textractor: PPSSPP memory found: use pattern 79 0F C7 85 and pattern offset 0 and string offset 0x%p to search for hooks", probe - 0x8000000); } probe += info.RegionSize; } diff --git a/texthook/engine/match64.cc b/texthook/engine/match64.cc index bd0258b..f378ae9 100644 --- a/texthook/engine/match64.cc +++ b/texthook/engine/match64.cc @@ -29,7 +29,7 @@ namespace Engine if (info.RegionSize == 0x1f00000 && info.Protect == PAGE_READWRITE && info.Type == MEM_MAPPED) { found = true; - ConsoleOutput("Textractor: PPSSPP memory found: use pattern 79 10 41 C7 and pattern offset 0 and string offset %p to search for hooks", probe - 0x8000000); + ConsoleOutput("Textractor: PPSSPP memory found: use pattern 79 10 41 C7 and pattern offset 0 and string offset 0x%p to search for hooks", probe - 0x8000000); } probe += info.RegionSize; } @@ -39,13 +39,13 @@ namespace Engine bool UnsafeDetermineEngineType() { + if (Util::CheckFile(L"PPSSPP*.exe") && FindPPSSPP()) return true; + for (std::wstring DXVersion : { L"d3dx9", L"d3dx10" }) if (HMODULE module = GetModuleHandleW(DXVersion.c_str())) PcHooks::hookD3DXFunctions(module); else for (int i = 0; i < 50; ++i) if (HMODULE module = GetModuleHandleW((DXVersion + L"_" + std::to_wstring(i)).c_str())) PcHooks::hookD3DXFunctions(module); - if (Util::CheckFile(L"PPSSPP*.exe") && FindPPSSPP()) return true; - PcHooks::hookGDIFunctions(); PcHooks::hookGDIPlusFunctions(); return false;