Widescreen resolutions in a dialog box

This commit is contained in:
Silent 2014-11-08 19:27:00 +01:00
parent 294e4c856d
commit 6716b1edbe

View file

@ -2965,6 +2965,9 @@ void Patch_SA_NewSteam()
// Unlocked widescreen resolutions
//Patch<WORD>(0x779BAD, 0x607D);
Patch<WORD>(0x779BB8, 0x557D);
Patch<DWORD>(0x7799D8, 0x9090117D);
Nop(0x779A45, 2);
Nop(0x7799DC, 2);
// TEST
//Nop(0x779C2F, 2);
@ -2981,6 +2984,15 @@ void Patch_SA_NewSteam()
//Nop(0x77AB3B, 3);
//Nop(0x77AB3F, 3);
// Default resolution to native resolution
RECT desktop;
GetWindowRect(GetDesktopWindow(), &desktop);
_snprintf(aNoDesktopMode, sizeof(aNoDesktopMode), "Cannot find %dx%dx32 video mode", desktop.right, desktop.bottom);
Patch<DWORD>(0x77A3EF, desktop.right);
Patch<DWORD>(0x77A3F4, desktop.bottom);
Patch<const char*>(0x77A44B, aNoDesktopMode);
// Proper aspect ratios
static const float f43 = 4.0f/3.0f, f54 = 5.0f/4.0f, f169 = 16.0f/9.0f;