Ja comprova la notificació d'eixir per diferenciarla de la resta

En ARCADE la notificació diferencia si vas a eixir o a apagar el sistema
This commit is contained in:
2024-10-15 20:40:45 +02:00
parent e0faa0890e
commit 53f5f3f8b0
3 changed files with 19 additions and 3 deletions

View File

@@ -29,14 +29,21 @@ namespace globalInputs
// Termina
void quit(section::Options code)
{
if (Notifier::get()->isActive())
const std::string exit_code = "QUIT";
auto code_found = stringInVector(Notifier::get()->getCodes(), exit_code);
if (code_found)
{
section::name = section::Name::QUIT;
section::options = code;
}
else
{
Notifier::get()->showText(lang::getText(94));
#ifdef ARCADE
const int index = code == section::Options::QUIT_NORMAL ? 94 : 116;
Notifier::get()->showText(lang::getText(index), std::string(), -1, exit_code);
#else
Notifier::get()->showText(lang::getText(94), std::string(), -1, exit_code);
#endif
}
}