acabat amb SDL_Log

This commit is contained in:
2025-03-27 20:56:21 +01:00
parent 8afca398e9
commit 36b3048070
11 changed files with 340 additions and 128 deletions

View File

@@ -66,7 +66,7 @@ bool loadOptionsFile(std::string file_path)
if (file.good())
{
// Procesa el fichero línea a línea
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Reading file: %s", getFileName(file_path).c_str());
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "\nReading file: %s", getFileName(file_path).c_str());
std::string line;
while (std::getline(file, line))
{
@@ -78,7 +78,6 @@ bool loadOptionsFile(std::string file_path)
// Procesa las dos subcadenas
if (!setOptions(line.substr(0, pos), line.substr(pos + 1, line.length())))
{
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "Warning: file %s", getFileName(file_path).c_str());
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "Unknown parameter: %s", line.substr(0, pos).c_str());
success = false;
}
@@ -184,7 +183,7 @@ bool setOptions(const std::string &var, const std::string &value)
auto success = true;
// Opciones de video
if (var == "video.mode")
if (var == "video.fullscreen")
{
options.video.fullscreen = stringToBool(value);
}