From 6716b1edbeab183b181f78909ae300d5089ddafd Mon Sep 17 00:00:00 2001 From: Silent Date: Sat, 8 Nov 2014 19:27:00 +0100 Subject: [PATCH] Widescreen resolutions in a dialog box --- SAFix/SilentPatchSA.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/SAFix/SilentPatchSA.cpp b/SAFix/SilentPatchSA.cpp index 6005b39..a2c41b1 100644 --- a/SAFix/SilentPatchSA.cpp +++ b/SAFix/SilentPatchSA.cpp @@ -2965,6 +2965,9 @@ void Patch_SA_NewSteam() // Unlocked widescreen resolutions //Patch(0x779BAD, 0x607D); Patch(0x779BB8, 0x557D); + Patch(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(0x77A3EF, desktop.right); + Patch(0x77A3F4, desktop.bottom); + Patch(0x77A44B, aNoDesktopMode); + // Proper aspect ratios static const float f43 = 4.0f/3.0f, f54 = 5.0f/4.0f, f169 = 16.0f/9.0f;