Fix Redumper write offset support

This commit is contained in:
Matt Nadareski
2023-02-24 13:32:22 -05:00
parent 0e0ff0cb80
commit 420e356f34
2 changed files with 7 additions and 5 deletions

View File

@@ -63,6 +63,7 @@
- Introduce cross-platform MMI
- Remove System.Management
- Add Redumper Universal Hash support
- Fix Redumper write offset support
### 2.4 (2022-10-26)

View File

@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
@@ -1006,7 +1006,7 @@ namespace MPF.Modules.Redumper
{
try
{
// We skip during detection and get the write offset
// If we find the universal hash line, return the hash only
string line;
while (!sr.EndOfStream)
{
@@ -1046,11 +1046,12 @@ namespace MPF.Modules.Redumper
if (sr.EndOfStream)
return null;
// We skip during detection and get the write offset
// If we find the disc write offset line, return the offset
string line;
while (!sr.EndOfStream && !(line = sr.ReadLine().TrimStart()).StartsWith("detection complete"))
while (!sr.EndOfStream)
{
if (line.StartsWith("disc write offset:"))
line = sr.ReadLine().TrimStart();
if (line.StartsWith("disc write offset"))
return line.Substring("disc write offset: ".Length).Trim();
}