[Patches+TLAC] Force toon (NPR1; option in launcher + press F9 to toggle)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#include "Utils.h"
|
||||
#include <Windows.h>
|
||||
|
||||
void InjectCode(void* address, const std::vector<uint8_t> data)
|
||||
{
|
||||
const size_t byteCount = data.size() * sizeof(uint8_t);
|
||||
|
||||
DWORD oldProtect;
|
||||
VirtualProtect(address, byteCount, PAGE_EXECUTE_READWRITE, &oldProtect);
|
||||
memcpy(address, data.data(), byteCount);
|
||||
VirtualProtect(address, byteCount, oldProtect, nullptr);
|
||||
}
|
||||
Reference in New Issue
Block a user