From efcf77c4b3383456a785899fdc4d68ca3bb2f077 Mon Sep 17 00:00:00 2001 From: Joona Perasto Date: Thu, 12 Mar 2020 02:20:07 +0200 Subject: [PATCH] Fix 3440x1440 resolution pixelation issue --- d3d9ex/AutoFix.cpp | 9 +++++++-- d3d9ex/Context.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/d3d9ex/AutoFix.cpp b/d3d9ex/AutoFix.cpp index 79c3c65..9c6a073 100644 --- a/d3d9ex/AutoFix.cpp +++ b/d3d9ex/AutoFix.cpp @@ -126,7 +126,7 @@ void MainContext::FF13_InitializeGameAddresses() } void MainContext::FF13_OneTimeFixes() { - MainContext::FF13_Workaround_2560_1440_Res_Bug(); + MainContext::FF13_Workaround_1440_Res_Bug(); MainContext::FF13_NOPIngameFrameRateLimitSetter(); MainContext::FF13_RemoveContinuousControllerScan(); MainContext::FF13_FixMissingEnemyScan(); @@ -137,7 +137,7 @@ void MainContext::FF13_OneTimeFixes() { context.didOneTimeFixes = true; } -void MainContext::FF13_Workaround_2560_1440_Res_Bug() +void MainContext::FF13_Workaround_1440_Res_Bug() { if (*ff13_internal_res_w == 2560 && *ff13_internal_res_h == 1440) { // We need to reduce one or another. Increasing the internal res causes crashes. @@ -145,6 +145,11 @@ void MainContext::FF13_Workaround_2560_1440_Res_Bug() PrintLog("Applying workaround for resolution 2560x1440 bug."); *ff13_internal_res_w = 2559; } + else if (*ff13_internal_res_w == 3440 && *ff13_internal_res_h == 1440) { + // Fix ultrawide pixelation also. + PrintLog("Applying workaround for resolution 3440x1440 bug."); + *ff13_internal_res_w = 3439; + } } diff --git a/d3d9ex/Context.h b/d3d9ex/Context.h index 08ee799..62dd511 100644 --- a/d3d9ex/Context.h +++ b/d3d9ex/Context.h @@ -117,7 +117,7 @@ private: static void FF13_AsyncPatching(); void FF13_InitializeGameAddresses(); void FF13_OneTimeFixes(); - void FF13_Workaround_2560_1440_Res_Bug(); + void FF13_Workaround_1440_Res_Bug(); void FF13_EnableControllerVibration(); void FF13_NOPIngameFrameRateLimitSetter(); void FF13_SetFrameRateVariables();