mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-12-22 21:35:48 +00:00
IPSwitch: Quick fix to patch sets toggling (#1668)
* IPSwitch: Quick fix to patch sets toggling * fmt fix: newlines before continue and return
This commit is contained in:
parent
04e048efcf
commit
8d0d299792
1 changed files with 13 additions and 1 deletions
|
@ -18,6 +18,7 @@ namespace Ryujinx.HLE.Loaders.Mods
|
||||||
if (header == null || !header.StartsWith(BidHeader))
|
if (header == null || !header.StartsWith(BidHeader))
|
||||||
{
|
{
|
||||||
Logger.Error?.Print(LogClass.ModLoader, "IPSwitch: Malformed PCHTXT file. Skipping...");
|
Logger.Error?.Print(LogClass.ModLoader, "IPSwitch: Malformed PCHTXT file. Skipping...");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,7 +148,7 @@ namespace Ryujinx.HLE.Loaders.Mods
|
||||||
|
|
||||||
MemPatch patches = new MemPatch();
|
MemPatch patches = new MemPatch();
|
||||||
|
|
||||||
bool enabled = true;
|
bool enabled = false;
|
||||||
bool printValues = false;
|
bool printValues = false;
|
||||||
int offset_shift = 0;
|
int offset_shift = 0;
|
||||||
|
|
||||||
|
@ -160,6 +161,13 @@ namespace Ryujinx.HLE.Loaders.Mods
|
||||||
|
|
||||||
while ((line = _reader.ReadLine()) != null)
|
while ((line = _reader.ReadLine()) != null)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(line))
|
||||||
|
{
|
||||||
|
enabled = false;
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
line = PreprocessLine(line);
|
line = PreprocessLine(line);
|
||||||
lineNum += 1;
|
lineNum += 1;
|
||||||
|
|
||||||
|
@ -190,6 +198,7 @@ namespace Ryujinx.HLE.Loaders.Mods
|
||||||
if (tokens.Length < 2)
|
if (tokens.Length < 2)
|
||||||
{
|
{
|
||||||
ParseWarn();
|
ParseWarn();
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,6 +207,7 @@ namespace Ryujinx.HLE.Loaders.Mods
|
||||||
if (tokens.Length != 3 || !ParseInt(tokens[2], out offset_shift))
|
if (tokens.Length != 3 || !ParseInt(tokens[2], out offset_shift))
|
||||||
{
|
{
|
||||||
ParseWarn();
|
ParseWarn();
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -222,12 +232,14 @@ namespace Ryujinx.HLE.Loaders.Mods
|
||||||
if (tokens.Length < 2)
|
if (tokens.Length < 2)
|
||||||
{
|
{
|
||||||
ParseWarn();
|
ParseWarn();
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Int32.TryParse(tokens[0], System.Globalization.NumberStyles.HexNumber, null, out int offset))
|
if (!Int32.TryParse(tokens[0], System.Globalization.NumberStyles.HexNumber, null, out int offset))
|
||||||
{
|
{
|
||||||
ParseWarn();
|
ParseWarn();
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue