Skip to content

Commit d9977d5

Browse files
committed
Corrected MSAA checks for new UI change
1 parent 0022e0d commit d9977d5

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

Sonic-06-Mod-Manager/src/UnifyPatcher.cs

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,8 +1406,8 @@ public static void ApplyTweaks(RushInterface rush) {
14061406

14071407
if (renderer != 0) proceed++;
14081408
if (reflections != 1) proceed++;
1409-
if (antiAliasing != 1) proceed++;
1410-
if (!forceMSAA) proceed++;
1409+
if (antiAliasing != 0) proceed++;
1410+
if (forceMSAA) proceed++;
14111411
if (cameraType != 0) proceed++;
14121412
if (cameraDistance != 650) proceed++;
14131413

@@ -1421,7 +1421,7 @@ public static void ApplyTweaks(RushInterface rush) {
14211421
// Default
14221422
if (renderer == 0) {
14231423
// Force MSAA
1424-
if (antiAliasing != 1 || forceMSAA) {
1424+
if (forceMSAA) {
14251425
rush.Status = $"Tweaking Anti-Aliasing...";
14261426
Console.WriteLine($"[{DateTime.Now:hh:mm:ss tt}] [Tweak] <cache.arc> Set Anti-Aliasing to {antiAliasing}...");
14271427
MSAA(Path.Combine(tweak, $"{system}\\scripts\\render\\"), antiAliasing, SearchOption.TopDirectoryOnly, 0);
@@ -1480,8 +1480,8 @@ public static void ApplyTweaks(RushInterface rush) {
14801480
} else if (Path.GetFileName(archive) == "scripts.arc") {
14811481
int proceed = 0;
14821482

1483-
if (antiAliasing != 1) proceed++;
1484-
if (!forceMSAA) proceed++;
1483+
if (antiAliasing != 0) proceed++;
1484+
if (forceMSAA) proceed++;
14851485

14861486
if (proceed != 0) {
14871487
if (!File.Exists($"{archive}_back"))
@@ -1493,7 +1493,7 @@ public static void ApplyTweaks(RushInterface rush) {
14931493
// Default
14941494
if (Properties.Settings.Default.Tweak_Renderer == 0)
14951495
// Force MSAA
1496-
if (antiAliasing != 1 || forceMSAA) {
1496+
if (forceMSAA) {
14971497
rush.Status = $"Tweaking Anti-Aliasing...";
14981498
Console.WriteLine($"[{DateTime.Now:hh:mm:ss tt}] [Tweak] <scripts.arc> Set Anti-Aliasing to {antiAliasing}...");
14991499
MSAA(Path.Combine(tweak, $"{system}\\scripts\\render\\"), antiAliasing, SearchOption.AllDirectories, 1);
@@ -1595,9 +1595,8 @@ private static void MSAA(string directoryRoot, int MSAA, SearchOption searchOpti
15951595

15961596
List<string> editedLua = File.ReadAllLines(lub).ToList();
15971597

1598-
if (MSAA == 0) editedLua.Add("MSAAType = \"1x\"");
1599-
else if (MSAA == 1) editedLua.Add("MSAAType = \"2x\"");
1600-
else if (MSAA == 2) editedLua.Add("MSAAType = \"4x\"");
1598+
if (MSAA == 0) editedLua.Add("MSAAType = \"2x\"");
1599+
else if (MSAA == 1) editedLua.Add("MSAAType = \"4x\"");
16011600
File.WriteAllLines(lub, editedLua);
16021601
} else if (arcSource == 0 && Path.GetFileName(lub) != "render_event.lub")
16031602
{
@@ -1614,9 +1613,8 @@ private static void MSAA(string directoryRoot, int MSAA, SearchOption searchOpti
16141613
foreach (string line in editedLua) {
16151614
if (line.Contains("MSAAType")) {
16161615
string[] tempLine = line.Split(' ');
1617-
if (MSAA == 0) tempLine[2] = "\"1x\"";
1618-
else if (MSAA == 1) tempLine[2] = "\"2x\"";
1619-
else if (MSAA == 2) tempLine[2] = "\"4x\"";
1616+
if (MSAA == 0) tempLine[2] = "\"2x\"";
1617+
else if (MSAA == 1) tempLine[2] = "\"4x\"";
16201618
editedLua[lineNum] = string.Join(" ", tempLine);
16211619
modified++;
16221620
}

0 commit comments

Comments
 (0)