diff --git a/source/engine.cpp b/source/engine.cpp index 442f6cd..cca3df7 100644 --- a/source/engine.cpp +++ b/source/engine.cpp @@ -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() { diff --git a/source/engine.hpp b/source/engine.hpp index f2822a2..390256d 100644 --- a/source/engine.hpp +++ b/source/engine.hpp @@ -182,14 +182,11 @@ class Engine { // PostFX uniforms (passed to GPU each frame) PostFXUniforms postfx_uniforms_ = {0.0f, 0.0f, 0.0f, 0.0f}; - int postfx_effect_mode_ = 0; + int postfx_effect_mode_ = 3; bool postfx_enabled_ = false; float postfx_override_vignette_ = -1.f; // -1 = sin override float postfx_override_chroma_ = -1.f; - // Cicle PostFX natiu (0=OFF, 1=Vinyeta, 2=Scanlines, 3=Cromàtica, 4=Complet) - int postfx_cycle_idx_ = 0; - // Sistema de zoom dinámico int current_window_zoom_ = DEFAULT_WINDOW_ZOOM;