lib: only switch debug keys when wasd is enabled

This commit is contained in:
itsmattkc 2022-07-15 18:27:34 -07:00
parent 2321dd0ab0
commit a378999790

View file

@ -70,7 +70,7 @@ __declspec(dllexport) DWORD WINAPI Patch()
}
// If using WASD, swap debug keys
{
if (config.GetInt(_T("UseWASD"))) {
const char *dbg_map_pattern = "\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x18\x18\x18\x18\x18\x18\x18\x02\x18\x03\x04\x18\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x18\x0E\x18\x18\x0F\x18";
const char *dbg_map_replace = "\x02\x18\x04\x0F\x18\x18\x18\x18\x18\x18\x18\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x18\x18\x18\x18\x18\x18\x18\x18\x18\x03\x18\x18\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x18\x0E\x18\x18\x18\x18";
SearchReplacePattern(dllBase, dbg_map_pattern, dbg_map_replace, 48, TRUE);