Much better way. Now flavor pidgen type is checked for and overridden in case it's different from the product's pidgen type. This allows Visual Studio 5/6 key generation to work properly again

This commit is contained in:
ArcticLuma113 2024-11-06 17:56:06 -05:00
parent c2a90dd8de
commit c61e025d9b
No known key found for this signature in database
GPG Key ID: 0C93DF7507521C68
1 changed files with 8 additions and 2 deletions

View File

@ -244,13 +244,19 @@ BOOL CLI::processOptions()
flavour = product;
}
auto pidtype = product["meta"]["type"];
if (flavour["meta"].contains("type"))
{
pidtype = flavour["meta"]["type"];
}
if (options.state != Options::STATE_PIDGEN_GENERATE && options.state != Options::STATE_PIDGEN_VALIDATE)
{
// exit early if we're not doing PIDGEN
goto processOptionsExitEarly;
}
if (product["meta"]["type"] == "PIDGEN3")
if (pidtype == "PIDGEN3")
{
options.pidgenversion = Options::PIDGEN_VERSION::PIDGEN_3;
if (options.verbose)
@ -272,7 +278,7 @@ BOOL CLI::processOptions()
fmt::print("Selected BINK: {}\n", options.binkID);
}
}
else if (product["meta"]["type"] == "PIDGEN2")
else if (pidtype == "PIDGEN2")
{
options.pidgenversion = Options::PIDGEN_VERSION::PIDGEN_2;
if (options.verbose)