Fixes for PlayStation RetroAchievements hashing (#4085)
* Fixed RA hash for PlayStation games when BOOT line contains tabs where spaces are expected. * Fixed RA hash and prevented infinite loop when PlayStation executable is in subdirectory.
This commit is contained in:
parent
62abee4813
commit
e77a036e0e
|
@ -97,6 +97,15 @@ namespace BizHawk.Client.EmuHawk
|
|||
return (buf2048[index + 4] << 16) | (buf2048[index + 3] << 8) | buf2048[index + 2];
|
||||
}
|
||||
}
|
||||
|
||||
// move on to next sector if filename not found in current sector due to subdirectory
|
||||
if (buf2048[index] == 0)
|
||||
{
|
||||
dsr.ReadLBA_2048(++sector, buf2048, 0);
|
||||
index = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
index += buf2048[index];
|
||||
}
|
||||
|
||||
|
@ -114,6 +123,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
dsr.ReadLBA_2048(sector, buf2048, 0);
|
||||
exePath = Encoding.ASCII.GetString(buf2048);
|
||||
|
||||
// replace any tab characters with space characters to normalize exePath
|
||||
exePath = exePath.Replace('\t', ' ');
|
||||
|
||||
// "BOOT = cdrom:" precedes the path
|
||||
var index = exePath.IndexOf("BOOT = cdrom:", StringComparison.Ordinal);
|
||||
if (index < -1) break;
|
||||
|
|
Loading…
Reference in New Issue