+5
-4
InfoPrint.cs
+5
-4
InfoPrint.cs
···
26
26
{ SaveDetection.SaveType.RB4Xbox, "Rock Band 4 Save Data (Xbox)" },
27
27
{ SaveDetection.SaveType.RB4Xbox_Decrypted, "Rock Band 4 Save Data (Xbox, Decrypted)" },
28
28
{ SaveDetection.SaveType.RB4XboxSystemOptions, "Rock Band 4 System Options (Xbox)" },
29
-
{ SaveDetection.SaveType.RB4XboxSystemOptions_Decrypted, "Rock Band 4 System Options (Xbox, Decrypted)" },
30
29
};
31
30
32
31
public static void RB4SystemInfo(RBSystemOptions system)
···
103
102
104
103
// handle decryption if necessary
105
104
if (type == SaveDetection.SaveType.AmpPS4 || type == SaveDetection.SaveType.RB4Xbox ||
106
-
type == SaveDetection.SaveType.RB4PS4 || type == SaveDetection.SaveType.RB4XboxSystemOptions)
105
+
type == SaveDetection.SaveType.RB4PS4)
107
106
{
108
107
// big endian save file
109
108
encStr = new EncryptedReadRevisionStream(inFile, false);
···
142
141
if (encStr != null)
143
142
encStr.FinishReading();
144
143
}
145
-
else if (type == SaveDetection.SaveType.RB4XboxSystemOptions || type == SaveDetection.SaveType.RB4XboxSystemOptions_Decrypted)
144
+
else if (type == SaveDetection.SaveType.RB4XboxSystemOptions)
146
145
{
147
-
RBSystemOptions options = RBSystemOptions.ReadFromStream(encStr == null ? inFile : encStr);
146
+
RevisionStream rev = new RevisionStream(encStr == null ? inFile : encStr, 0, 0, false);
147
+
RBSystemOptions options = RBSystemOptions.ReadFromStream(rev);
148
148
RB4SystemInfo(options);
149
+
rev.FinishReading();
149
150
if (encStr != null)
150
151
encStr.FinishReading();
151
152
}
+4
-8
Saves/Detection.cs
+4
-8
Saves/Detection.cs
···
25
25
26
26
// Rock Band 4
27
27
RB4Xbox,
28
-
RB4XboxSystemOptions,
29
28
RB4PS4,
30
29
RB4Xbox_Decrypted,
31
-
RB4XboxSystemOptions_Decrypted,
32
30
RB4PS4_Decrypted,
31
+
RB4XboxSystemOptions,
33
32
}
34
33
35
34
public static SaveType DetectSaveType(byte[] readBuffer)
···
57
56
else
58
57
return SaveType.RB4Xbox_Decrypted;
59
58
}
60
-
// RBSystemOptions standalone is revision 0x1C
61
-
else if (revision == 0x1C)
62
-
return SaveType.RB4XboxSystemOptions_Decrypted;
59
+
// RBSystemOptions standalone is revision 0 with an inner stream of 0x1C
60
+
else if (revision == 0x00 && BitConverter.ToUInt32(readBuffer, 6) == 0x1C)
61
+
return SaveType.RB4XboxSystemOptions;
63
62
// Encrypted RevisionStreams are always revision 0x00
64
63
else if (revision == 0x00)
65
64
{
···
95
94
else
96
95
return SaveType.RB4Xbox;
97
96
}
98
-
// RBSystemOptions standalone is revision 0x1C
99
-
else if (revision_enc == 0x1C)
100
-
return SaveType.RB4XboxSystemOptions;
101
97
else
102
98
return SaveType.Unsupported;
103
99
}