corregides cridades a SDL3 i migrat casi tot de int a float. Falta jail_shader

This commit is contained in:
2025-10-15 12:16:50 +02:00
parent 7c102e42cc
commit e4a08d2ec7
52 changed files with 879 additions and 823 deletions

View File

@@ -1,6 +1,6 @@
#include "options.h"
#include <SDL3/SDL.h>
#include <SDL3/SDL.h>
#include <algorithm> // Para find_if
#include <cctype> // Para isspace
@@ -131,7 +131,7 @@ bool saveOptionsToFile(const std::string& file_path) {
file << "\n## VIDEO\n";
file << "# Modo de video: 0 = Ventana, 1 = Pantalla completa, 2 = Pantalla completa (escritorio)\n";
file << "video.mode " << options.video.mode << "\n\n";
file << "video.mode " << options.video.fullscreen << "\n\n";
file << "# Filtro de pantalla: 0 = Nearest, 1 = Linear\n";
file << "video.filter " << static_cast<int>(options.video.filter) << "\n\n";
file << "# Shaders: 1 = Activado, 0 = Desactivado\n";
@@ -176,14 +176,7 @@ bool setOptions(const std::string& var, const std::string& value) {
options.window.zoom = DEFAULT_WINDOW_ZOOM;
}
}},
{"video.mode", [](const std::string& v) {
int val = safeStoi(v, 0);
if (val == 0 || val == SDL_WINDOW_FULLSCREEN_DESKTOP) {
options.video.mode = val;
} else {
options.video.mode = 0;
}
}},
{"video.mode", [](const std::string& v) { options.video.fullscreen = stringToBool(v); }},
{"video.filter", [](const std::string& v) {
int val = safeStoi(v, static_cast<int>(DEFAULT_VIDEO_FILTER));
if (val == static_cast<int>(ScreenFilter::NEAREST) || val == static_cast<int>(ScreenFilter::LINEAR)) {