From 1bf2c51105fef1bf0b60ffb12eb293bb698595dd Mon Sep 17 00:00:00 2001 From: 53 <167388310+niresh1234@users.noreply.github.com> Date: Fri, 29 Nov 2024 19:16:24 +0530 Subject: [PATCH 1/2] Update dllmain.cpp --- source/GTASA.WidescreenFix/dllmain.cpp | 33 +++++++++++++++----------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/source/GTASA.WidescreenFix/dllmain.cpp b/source/GTASA.WidescreenFix/dllmain.cpp index d5208960a..90d4d53ed 100644 --- a/source/GTASA.WidescreenFix/dllmain.cpp +++ b/source/GTASA.WidescreenFix/dllmain.cpp @@ -16,6 +16,7 @@ float fDefaultWidth; float fDefaultCoords; float fFrontendDefaultWidth; bool bProportionalWeaponIcon = false; +bool bEnableSCMDrawingFixes = true; void ReadSettings() { @@ -33,6 +34,7 @@ void ReadSettings() fRadarHeightScale = iniReader.ReadFloat("MAIN", "RadarHeightScale", 0.0f); fRadarHeightScale == 0.0f ? fRadarHeightScale = 1.0f : fRadarHeightScale; fSubtitlesScale = iniReader.ReadFloat("MAIN", "SubtitlesScale", 0.0f); fSubtitlesScale == 0.0f ? fSubtitlesScale = 1.0f : fSubtitlesScale; bProportionalWeaponIcon = iniReader.ReadInteger("MAIN", "ProportionalWeaponIcon", 0) != 0; + bEnableSCMDrawingFixes = iniReader.ReadInteger("MAIN", "EnableSCMDrawingFixes", 1) != 0; bSmartCutsceneBorders = iniReader.ReadInteger("MISC", "SmartCutsceneBorders", 1) != 0; bAllowAltTabbingWithoutPausing = iniReader.ReadInteger("MISC", "AllowAltTabbingWithoutPausing", 0) != 0; @@ -667,26 +669,29 @@ void __stdcall DrawWindowHook(CRect *rect, char *titleKey, char fadeState, CRGBA void InstallSCMDrawingFixes() { - hbDrawRect.fun = injector::MakeCALL(0x464A53, DrawRectHook).get(); - injector::MakeCALL(0x464A53, DrawRectHook); + if (bEnableSCMDrawingFixes) + { + hbDrawRect.fun = injector::MakeCALL(0x464A53, DrawRectHook).get(); + injector::MakeCALL(0x464A53, DrawRectHook); - hbDraw.fun = injector::MakeCALL(0x464A90, DrawSpriteHook).get(); - injector::MakeCALL(0x464A90, DrawSpriteHook); + hbDraw.fun = injector::MakeCALL(0x464A90, DrawSpriteHook).get(); + injector::MakeCALL(0x464A90, DrawSpriteHook); - hbDraw2.fun = injector::MakeCALL(0x464B7F, DrawSpriteHook2).get(); - injector::MakeCALL(0x464B7F, DrawSpriteHook2); + hbDraw2.fun = injector::MakeCALL(0x464B7F, DrawSpriteHook2).get(); + injector::MakeCALL(0x464B7F, DrawSpriteHook2); - hbPrintString.fun = injector::MakeCALL(0x58C229, PrintStringHook).get(); - injector::MakeCALL(0x58C229, PrintStringHook); + hbPrintString.fun = injector::MakeCALL(0x58C229, PrintStringHook).get(); + injector::MakeCALL(0x58C229, PrintStringHook); - hbSetScale.fun = injector::MakeCALL(0x58C0E8, SetScaleHook).get(); - injector::MakeCALL(0x58C0E8, SetScaleHook); + hbSetScale.fun = injector::MakeCALL(0x58C0E8, SetScaleHook).get(); + injector::MakeCALL(0x58C0E8, SetScaleHook); - hbSetWrapx.fun = injector::MakeCALL(0x58C137, SetWrapxHook).get(); - injector::MakeCALL(0x58C137, SetWrapxHook); + hbSetWrapx.fun = injector::MakeCALL(0x58C137, SetWrapxHook).get(); + injector::MakeCALL(0x58C137, SetWrapxHook); - hbDrawWindow.fun = injector::MakeCALL(0x464A24, DrawWindowHook).get(); - injector::MakeCALL(0x464A24, DrawWindowHook); + hbDrawWindow.fun = injector::MakeCALL(0x464A24, DrawWindowHook).get(); + injector::MakeCALL(0x464A24, DrawWindowHook); + } } void InstallAspectRatioFixes() From 638e6900d95626a80850637539a6a1b85cb9efb4 Mon Sep 17 00:00:00 2001 From: 53 <167388310+niresh1234@users.noreply.github.com> Date: Fri, 29 Nov 2024 19:17:40 +0530 Subject: [PATCH 2/2] Update GTASA.WidescreenFix.ini --- data/GTASA.WidescreenFix/scripts/GTASA.WidescreenFix.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/GTASA.WidescreenFix/scripts/GTASA.WidescreenFix.ini b/data/GTASA.WidescreenFix/scripts/GTASA.WidescreenFix.ini index 416430162..b34e189d7 100644 --- a/data/GTASA.WidescreenFix/scripts/GTASA.WidescreenFix.ini +++ b/data/GTASA.WidescreenFix/scripts/GTASA.WidescreenFix.ini @@ -18,6 +18,7 @@ RadarWidthScale = 0.82 ; Original value is 1.0. RadarHeightScale = 0.0 ; Original value is 1.0. SubtitlesScale = 0.0 ; Original value is 1.0. ProportionalWeaponIcon = 0 +EnableSCMDrawingFixes = 1 ; Turn OFF IF HAVING SCM DRAWING ISSUE WITH CLEO/ASI MODS [MISC] ; Same as in VCS PCE, cutscene border size will be adjusted to fit your resolution. On resolutions bigger than 16:9 vertical borders will be used. Note that you can enable or disable cutscene borders via 'WIDESCREEN'/'BORDERS' option in game menu (0|1). @@ -29,4 +30,4 @@ HideAABug = 0 ; Disable the small white dot that appears while aiming with some weapons (0|1). DisableWhiteCrosshairDot = 0 ; Replaces text shadow with outline (0|1|2). -ReplaceTextShadowWithOutline = 2 \ No newline at end of file +ReplaceTextShadowWithOutline = 2