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:
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user