System: Improve translatability of save state error

This commit is contained in:
Connor McLaughlin 2020-11-28 00:35:03 +10:00
parent bb1e3a0692
commit a75b6e512a
1 changed files with 12 additions and 4 deletions

View File

@ -951,13 +951,21 @@ bool DoLoadState(ByteStream* state, bool force_software_renderer, bool update_di
if (header.magic != SAVE_STATE_MAGIC)
return false;
if (header.version < SAVE_STATE_MINIMUM_VERSION || header.version > SAVE_STATE_VERSION)
if (header.version < SAVE_STATE_MINIMUM_VERSION)
{
g_host_interface->ReportFormattedError(
g_host_interface->TranslateString("System",
"Save state is incompatible: %s version is %u but state is version %u."),
header.version > SAVE_STATE_VERSION ? "maximum" : "minimum",
header.version > SAVE_STATE_VERSION ? SAVE_STATE_VERSION : SAVE_STATE_MINIMUM_VERSION, header.version);
"Save state is incompatible: minimum version is %u but state is version %u."),
SAVE_STATE_MINIMUM_VERSION, header.version);
return false;
}
if (header.version > SAVE_STATE_VERSION)
{
g_host_interface->ReportFormattedError(
g_host_interface->TranslateString("System",
"Save state is incompatible: maximum version is %u but state is version %u."),
SAVE_STATE_VERSION, header.version);
return false;
}