Modificats, estructurats i ben formatats alguns missatges de consola
Canvis en els codis d'eixida del programa
This commit is contained in:
@@ -134,6 +134,8 @@ Director::~Director()
|
||||
SDL_DestroyWindow(window_);
|
||||
|
||||
SDL_Quit();
|
||||
|
||||
std::cout << "\nBye!" << std::endl;
|
||||
}
|
||||
|
||||
// Asigna los botones y teclas al objeto Input
|
||||
@@ -658,19 +660,20 @@ int Director::run()
|
||||
|
||||
#ifdef ARCADE
|
||||
// Comprueba si ha de apagar el sistema
|
||||
if (section::options == section::Options::QUIT_SHUTDOWN)
|
||||
if (section::options == section::Options::QUIT_WITH_CONTROLLER)
|
||||
shutdownSystem();
|
||||
#endif
|
||||
|
||||
const auto return_code = (section::options == section::Options::QUIT_NORMAL) ? "keyboard" : "controller";
|
||||
std::cout << "\nGame end with " << return_code << std::endl;
|
||||
const auto return_code = (section::options == section::Options::QUIT_WITH_KEYBOARD) ? "with keyboard" : (section::options == section::Options::QUIT_WITH_CONTROLLER) ? "with controller"
|
||||
: "from event";
|
||||
std::cout << "\nGame end " << return_code << std::endl;
|
||||
|
||||
#ifndef VERBOSE
|
||||
// Habilita de nuevo los std::cout
|
||||
std::cout.rdbuf(orig_buf);
|
||||
#endif
|
||||
|
||||
return (return_code == std::string("keyboard")) ? 0 : 1;
|
||||
return (section::options == section::Options::QUIT_WITH_CONTROLLER) ? 1 : 0;
|
||||
}
|
||||
|
||||
// Obtiene una fichero a partir de un lang::Code
|
||||
|
||||
Reference in New Issue
Block a user