Eliminat tots els options.console
This commit is contained in:
@@ -13,13 +13,6 @@ bool setOptions(std::string var, std::string value);
|
||||
// Inicializa las opciones del programa
|
||||
void initOptions()
|
||||
{
|
||||
// Opciones varias
|
||||
#ifdef VERBOSE
|
||||
options.console = true;
|
||||
#else
|
||||
options.console = false;
|
||||
#endif
|
||||
|
||||
// Opciones de video
|
||||
#ifdef ANBERNIC
|
||||
options.video.mode = 0;
|
||||
@@ -101,10 +94,9 @@ bool loadOptionsFile(std::string filePath)
|
||||
if (file.good())
|
||||
{
|
||||
// Procesa el fichero linea a linea
|
||||
if (options.console)
|
||||
{
|
||||
std::cout << "Reading file: " << fileName << std::endl;
|
||||
}
|
||||
#ifdef VERBOSE
|
||||
std::cout << "Reading file: " << fileName << std::endl;
|
||||
#endif
|
||||
std::string line;
|
||||
while (std::getline(file, line))
|
||||
{
|
||||
@@ -116,11 +108,10 @@ bool loadOptionsFile(std::string filePath)
|
||||
// Procesa las dos subcadenas
|
||||
if (!setOptions(line.substr(0, pos), line.substr(pos + 1, line.length())))
|
||||
{
|
||||
if (options.console)
|
||||
{
|
||||
std::cout << "Warning: file " << fileName << std::endl;
|
||||
std::cout << "Unknown parameter " << line.substr(0, pos).c_str() << std::endl;
|
||||
}
|
||||
#ifdef VERBOSE
|
||||
std::cout << "Warning: file " << fileName << std::endl;
|
||||
std::cout << "Unknown parameter " << line.substr(0, pos).c_str() << std::endl;
|
||||
#endif
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
@@ -166,17 +157,15 @@ bool saveOptionsFile(std::string filePath)
|
||||
|
||||
if (!file.good())
|
||||
{
|
||||
if (options.console)
|
||||
{
|
||||
std::cout << fileName << " can't be opened" << std::endl;
|
||||
}
|
||||
#ifdef VERBOSE
|
||||
std::cout << fileName << " can't be opened" << std::endl;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
if (options.console)
|
||||
{
|
||||
std::cout << "Writing file: " << fileName << std::endl;
|
||||
}
|
||||
#ifdef VERBOSE
|
||||
std::cout << "Writing file: " << fileName << std::endl;
|
||||
#endif
|
||||
|
||||
// Opciones de video
|
||||
file << "## VIDEO\n";
|
||||
|
||||
Reference in New Issue
Block a user