Skip to content

Commit 8a73c90

Browse files
committed
modified: source/fixes/HitmanCodename47WidescreenFix/dllmain.cpp
1 parent a6cfafe commit 8a73c90

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

source/fixes/HitmanCodename47WidescreenFix/dllmain.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ HMODULE exeModule = GetModuleHandle(NULL);
2525
HMODULE thisModule;
2626
HMODULE dllModule2 = nullptr;
2727
HMODULE dllModule3 = nullptr;
28+
std::string dllModule3Name;
2829

2930
// Fix details
3031
std::string sFixName = "HitmanCodename47WidescreenFix";
31-
std::string sFixVersion = "1.1";
32+
std::string sFixVersion = "1.1.1";
3233
std::filesystem::path sFixPath;
3334

3435
// Ini
@@ -207,7 +208,9 @@ bool DetectGame()
207208
return false;
208209
}
209210

210-
dllModule3 = Memory::GetHandle({ "RenderD3D.dll", "RenderOpenGL.dll" });
211+
dllModule3 = Memory::GetHandle({ "RenderD3D.dll", "RenderOpenGL.dll" }, 50);
212+
213+
dllModule3Name = Memory::GetModuleName(dllModule3);
211214

212215
return true;
213216
}
@@ -228,7 +231,7 @@ void WidescreenFix()
228231
std::uint8_t* ResolutionInstructionsScanResult = Memory::PatternScan(dllModule3, "0F 84 ?? ?? ?? ?? 8B 42");
229232
if (ResolutionInstructionsScanResult)
230233
{
231-
spdlog::info("Resolution Instructions Scan: Address is RenderD3D.dll+{:x}", ResolutionInstructionsScanResult - (std::uint8_t*)dllModule3);
234+
spdlog::info("Resolution Instructions Scan: Address is {}+{:x}", dllModule3Name, ResolutionInstructionsScanResult - (std::uint8_t*)dllModule3);
232235

233236
Memory::WriteNOPs(ResolutionInstructionsScanResult, 6);
234237

0 commit comments

Comments
 (0)