New: refeta la lògica d'eixir o apagar el sistema
This commit is contained in:
@@ -17,24 +17,19 @@
|
||||
namespace globalInputs
|
||||
{
|
||||
// Termina
|
||||
void quit(section::Options code)
|
||||
void quit()
|
||||
{
|
||||
const std::string CODE = "QUIT";
|
||||
if (Notifier::get()->checkCode(CODE))
|
||||
{
|
||||
// Si la notificación de salir está activa, cambia de sección
|
||||
section::name = section::Name::QUIT;
|
||||
section::options = code;
|
||||
section::options = section::Options::NONE;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Si la notificación de salir no está activa, muestra la notificación
|
||||
#ifdef ARCADE
|
||||
const std::string TEXT = code == section::Options::QUIT_WITH_CONTROLLER ? lang::getText("[NOTIFICATIONS] 02") : lang::getText("[NOTIFICATIONS] 01");
|
||||
Notifier::get()->show({TEXT, std::string()}, -1, CODE);
|
||||
#else
|
||||
Notifier::get()->show({lang::getText("[NOTIFICATIONS] 01"), std::string()}, -1, CODE);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -356,7 +351,7 @@ namespace globalInputs
|
||||
// Salir
|
||||
if (Input::get()->checkInput(InputAction::EXIT, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::KEYBOARD))
|
||||
{
|
||||
quit(section::Options::QUIT_WITH_KEYBOARD);
|
||||
quit();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user