code: Minor changes

> related to previous commit
This commit is contained in:
[ ]
2025-11-19 20:36:10 +09:00
parent e15c689061
commit 3f7dcd72bb
3 changed files with 5 additions and 7 deletions
+3 -6
View File
@@ -19,21 +19,20 @@ bool on_thum_exists_(void *titleUTF_getter, int32_t id, char flag)
}
else
{
log_misc("hooks::wmisc::thumbnail", "Caching state for [{}]", id);
// log_misc("hooks::wmisc::thumbnail", "Caching state for [{}]", id);
it = thumids.insert({id, ThumExists(titleUTF_getter, id, flag)}).first;
}
return it->second;
}
void run(HINSTANCE hmodule)
{
// Reverse lookup function head (PUSH RDI) for ThumExists() specific signature, quietly fail if invalid
intptr_t beg, match, TX_ThumExists;
TX_ThumExists = beg = match = find_pattern_from(hmodule, "83f801750c4084ff750732c0", "XXXXXXXXXXXX", 0, 0, 0);
while (beg > sizeof(intptr_t) && match >= TX_ThumExists)
while (beg > sizeof(void *) && match >= TX_ThumExists)
{
beg--;
beg -= sizeof(void *);
match = find_pattern_from(hmodule, "4057", "XX", 0, 0, beg - reinterpret_cast<intptr_t>(hmodule));
}
TX_ThumExists = match;
@@ -67,6 +66,4 @@ void apply_performance_hacks(HINSTANCE hmodule, const char *model, const char *e
}
}
}