Skip to content

Instantly share code, notes, and snippets.

@l1am9111
Created January 5, 2012 18:59
Show Gist options
  • Save l1am9111/1566660 to your computer and use it in GitHub Desktop.
Save l1am9111/1566660 to your computer and use it in GitHub Desktop.
Allow higher resolutions on GTA: San Andreas
// cl sares.cpp -LD user32.lib kernel32.lib -link -entry:DllMain /out:sares.asi
#include <windows.h>
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
if(ul_reason_for_call == DLL_PROCESS_ATTACH)
{
DWORD oldProt;
VirtualProtect((LPVOID)0x401000, 0x4A3000, PAGE_EXECUTE_READWRITE, &oldProt);
*(WORD *)0x745BC9 = 0x9090;
*(WORD *)0x7459E1 = 0x9090;
}
return TRUE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment