refactor: separar F5 (toggle) y X (ciclo modos) en PostFX

- X ya no incluye OFF en el ciclo; si PostFX está desactivado, no hace nada
- cycleShader() cicla solo entre los 4 modos usando postfx_effect_mode_
- Eliminar postfx_cycle_idx_ (redundante, causaba desincronización)
- postfx_effect_mode_ por defecto = 3 (completo) para que F5 active completo sin --postfx

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-20 18:36:45 +01:00
parent f3b029c5b6
commit 200672756c
2 changed files with 12 additions and 21 deletions

View File

@@ -1102,24 +1102,18 @@ void Engine::setPostFXParamOverrides(float vignette, float chroma) {
}
void Engine::cycleShader() {
static const char* names[5] = {
"PostFX desactivado", "PostFX viñeta", "PostFX scanlines",
"PostFX cromática", "PostFX completo"
};
postfx_cycle_idx_ = (postfx_cycle_idx_ + 1) % 5;
int cycle = postfx_cycle_idx_;
// X no hace nada si PostFX está desactivado
if (!postfx_enabled_) return;
if (cycle == 0) {
postfx_enabled_ = false;
postfx_uniforms_.vignette_strength = 0.0f;
postfx_uniforms_.chroma_strength = 0.0f;
postfx_uniforms_.scanline_strength = 0.0f;
} else {
postfx_enabled_ = true;
postfx_effect_mode_ = cycle - 1;
applyPostFXPreset(postfx_effect_mode_);
}
showNotificationForAction(names[cycle]);
// Cicla solo entre los 4 modos (sin OFF)
postfx_effect_mode_ = (postfx_effect_mode_ + 1) % 4;
applyPostFXPreset(postfx_effect_mode_);
static constexpr const char* names[4] = {
"PostFX viñeta", "PostFX scanlines",
"PostFX cromática", "PostFX completo"
};
showNotificationForAction(names[postfx_effect_mode_]);
}
void Engine::toggleIntegerScaling() {