MCPcopy Create free account
hub / github.com/Wemino/MarkerPatch / LoadSaveFileList_Hook

Function LoadSaveFileList_Hook

src/Features/Fixes/FixSaveStringHandling.cpp:12–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10safetyhook::InlineHook CopyStringFromSave;
11
12static int __fastcall LoadSaveFileList_Hook(int thisPtr, int, const wchar_t* Source, int a3, int a4)
13{
14 // Replace wildcard with two-char pattern for save slots
15 if (wcscmp(Source, L"ds_slot_*.deadspacesaved") == 0)
16 {
17 Source = L"ds_slot_??.deadspacesaved";
18 }
19 else if (wcscmp(Source, L"ds_slot_*.deadspace2saved") == 0)
20 {
21 Source = L"ds_slot_??.deadspace2saved";
22 }
23
24 return LoadSaveFileList.thiscall<int>(thisPtr, Source, a3, a4);
25}
26
27static errno_t __cdecl CopyStringFromSave_Hook(wchar_t* Destination, wchar_t* Source)
28{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected