hos: allow turning off ams extension hard-reqs for unit testing

This commit is contained in:
Michael Scire 2021-10-22 09:40:18 -07:00 committed by SciresM
parent 2a842791eb
commit 018ae08409
5 changed files with 42 additions and 1 deletions

View file

@ -61,7 +61,16 @@ namespace ams::hos {
}
bool IsUnitTestProgramForSetVersion();
void InitializeVersionInternal(bool allow_approximate) {
/* If we're unit testing, just set the version and move on. */
if (IsUnitTestProgramForSetVersion()) {
g_hos_version = hos::Version_Current;
g_set_hos_version = true;
return;
}
/* Get the current (and previous approximation of) target firmware. */
hos::Version prev, current;
bool has_prev = false;