Change platform assert to log

This commit is contained in:
jvyden 2022-01-30 15:46:21 -05:00
commit bf4b957da1
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278

View file

@ -1,6 +1,5 @@
#nullable enable #nullable enable
using System; using System;
using System.Diagnostics;
using System.IO; using System.IO;
using System.Text; using System.Text;
using System.Text.Json; using System.Text.Json;
@ -112,12 +111,6 @@ public class NPTicket
default: throw new NotImplementedException(); default: throw new NotImplementedException();
} }
if (npTicket.Platform == Platform.Unknown)
{
Logger.Log($"Could not determine platform from IssuerId {npTicket.IssuerId} decimal", LoggerLevelLogin.Instance);
return null;
}
// We already read the title id, however we need to do some post-processing to get what we want. // We already read the title id, however we need to do some post-processing to get what we want.
// Current data: UP9000-BCUS98245_00 // Current data: UP9000-BCUS98245_00
// We need to chop this to get the titleId we're looking for // We need to chop this to get the titleId we're looking for
@ -146,10 +139,18 @@ public class NPTicket
_ => Platform.Unknown, _ => Platform.Unknown,
}; };
if (npTicket.Platform == Platform.Unknown)
{
Logger.Log($"Could not determine platform from IssuerId {npTicket.IssuerId} decimal", LoggerLevelLogin.Instance);
return null;
}
#if DEBUG
if (npTicket.GameVersion == GameVersion.LittleBigPlanetVita) if (npTicket.GameVersion == GameVersion.LittleBigPlanetVita)
{ {
Debug.Assert(npTicket.Platform == Platform.Vita); Logger.Log($"Platform for vita ticket is {npTicket.Platform}", LoggerLevelLogin.Instance);
} }
#endif
#if DEBUG #if DEBUG
Logger.Log("npTicket data:", LoggerLevelLogin.Instance); Logger.Log("npTicket data:", LoggerLevelLogin.Instance);