2
0
mirror of https://github.com/Thracky/GlosSI.git synced 2024-11-17 03:26:02 +00:00

SteamTarget: Remove unnecessary VirtualProtect calls

This commit is contained in:
Peter Repukat 2017-02-15 20:10:16 +01:00
parent a9d947812e
commit 4693542321

View File

@ -193,11 +193,11 @@ DWORD VirtualControllerThread::callRealXinputGetState(DWORD dwUserIndex, XINPUT_
{
*(Address + i) = realBytes[i];
}
VirtualProtect(Address, opPatchLenght, dwOldProtect, &dwBkup); //Revert permission change...
//VirtualProtect(Address, opPatchLenght, dwOldProtect, &dwBkup); //Revert permission change...
ret = XGetState(dwUserIndex, pState); //Cal REAL XInputGetState...
VirtualProtect(Address, opPatchLenght, PAGE_EXECUTE_READWRITE, &dwOldProtect); //Change permissions of memory..
//VirtualProtect(Address, opPatchLenght, PAGE_EXECUTE_READWRITE, &dwOldProtect); //Change permissions of memory..
for (int i = 0; i < opPatchLenght; i++) //repatch Valve's hook
{
*(Address + i) = valveHookBytes[i];