eliminades referencies a opengl

This commit is contained in:
2026-03-23 17:04:21 +01:00
parent 58512840a4
commit 270cd1d487
19 changed files with 104 additions and 80 deletions

View File

@@ -245,19 +245,41 @@ namespace Options {
if (vid.contains("integer_scale")) {
try { video.integer_scale = vid["integer_scale"].get_value<bool>(); } catch (...) {}
}
if (vid.contains("shaders")) {
try { video.shaders = vid["shaders"].get_value<bool>(); } catch (...) {}
}
if (vid.contains("postfx")) {
try { video.postfx = vid["postfx"].get_value<bool>(); } catch (...) {}
}
if (vid.contains("supersampling")) {
try { video.supersampling = vid["supersampling"].get_value<bool>(); } catch (...) {}
// Nuevo formato: supersampling (bool) + supersampling_amount (int)
// Backward compat: si solo existe supersampling como int, también funciona
{
bool ss_enabled = false;
int ss_amount = 3;
if (vid.contains("supersampling")) {
try {
const auto& node = vid["supersampling"];
if (node.is_boolean()) {
ss_enabled = node.get_value<bool>();
} else {
// Formato antiguo: int directamente
int factor = node.get_value<int>();
ss_enabled = factor >= 2;
ss_amount = (factor >= 2) ? factor : 3;
}
} catch (...) {}
}
if (vid.contains("supersampling_amount")) {
try {
int amount = vid["supersampling_amount"].get_value<int>();
if (amount >= 2) { ss_amount = amount; }
} catch (...) {}
}
video.supersampling = ss_enabled ? ss_amount : 1;
}
if (vid.contains("postfx_preset")) {
try {
int preset = vid["postfx_preset"].get_value<int>();
if (preset >= 0 && preset < static_cast<int>(postfx_presets.size())) {
// No validamos contra postfx_presets.size() aquí porque postfx.yaml
// aún no se ha cargado. El clamp se hace en loadPostFXFromFile().
if (preset >= 0) {
current_postfx_preset = preset;
}
} catch (...) {}
@@ -430,10 +452,10 @@ namespace Options {
file << " scale_mode: " << static_cast<int>(video.scale_mode) << " # " << static_cast<int>(SDL_ScaleMode::SDL_SCALEMODE_NEAREST) << ": nearest, " << static_cast<int>(SDL_ScaleMode::SDL_SCALEMODE_LINEAR) << ": linear\n";
file << " vsync: " << boolToString(video.vsync) << "\n";
file << " integer_scale: " << boolToString(video.integer_scale) << "\n";
file << " shaders: " << boolToString(video.shaders) << "\n";
file << " postfx: " << boolToString(video.postfx) << "\n";
file << " supersampling: " << boolToString(video.supersampling) << "\n";
file << " postfx_preset: " << current_postfx_preset << "\n";
file << " supersampling: " << boolToString(video.supersampling > 1) << "\n";
file << " supersampling_amount: " << std::max(2, video.supersampling) << "\n";
file << "\n";
// AUDIO