mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-11-22 05:22:32 +01:00
Refactor version checking in III/VC to new method
This commit is contained in:
parent
883b0dde94
commit
2d1c7f97e6
@ -858,9 +858,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||
{
|
||||
std::unique_ptr<ScopedUnprotect::Unprotect> Protect = ScopedUnprotect::UnprotectSectionOrFullModule( GetModuleHandle( nullptr ), ".text" );
|
||||
|
||||
if (*(DWORD*)0x5C1E75 == 0xB85548EC) Patch_III_10(desktop);
|
||||
else if (*(DWORD*)0x5C2135 == 0xB85548EC) Patch_III_11(desktop);
|
||||
else if (*(DWORD*)0x5C6FD5 == 0xB85548EC) Patch_III_Steam(desktop);
|
||||
const int8_t version = Memory::GetVersion().version;
|
||||
if ( version == 0 ) Patch_III_10(desktop);
|
||||
else if ( version == 1 ) Patch_III_11(desktop);
|
||||
else if ( version == 2 ) Patch_III_Steam(desktop);
|
||||
|
||||
Patch_III_Common();
|
||||
Common::Patches::III_VC_Common();
|
||||
|
@ -671,9 +671,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||
{
|
||||
std::unique_ptr<ScopedUnprotect::Unprotect> Protect = ScopedUnprotect::UnprotectSectionOrFullModule( GetModuleHandle( nullptr ), ".text" );
|
||||
|
||||
if(*(DWORD*)0x667BF5 == 0xB85548EC) Patch_VC_10(desktop);
|
||||
else if(*(DWORD*)0x667C45 == 0xB85548EC) Patch_VC_11(desktop);
|
||||
else if (*(DWORD*)0x666BA5 == 0xB85548EC) Patch_VC_Steam(desktop);
|
||||
const int8_t version = Memory::GetVersion().version;
|
||||
if ( version == 0 ) Patch_VC_10(desktop);
|
||||
else if ( version == 1 ) Patch_VC_11(desktop);
|
||||
else if ( version == 2 ) Patch_VC_Steam(desktop);
|
||||
|
||||
// Y axis sensitivity only
|
||||
else if (*(DWORD*)0x601048 == 0x5E5F5D60) Patch_VC_JP();
|
||||
|
Loading…
Reference in New Issue
Block a user