Merge fix/shader-keys-and-service-menu — passthrough real i F5/F6 gatejades
This commit is contained in:
commit
8746ee9ec9
3 files changed
+11
-1
No files matched your search
+1
-1
@@ -77,7 +77,7 @@ notifier:
|
|||||||
line_gap: 1
|
line_gap: 1
|
||||||
margin_top: 3
|
margin_top: 3
|
||||||
border_px: 1
|
border_px: 1
|
||||||
slide_ms: 400
|
slide_ms: 300
|
||||||
slide_in_curve: outCubic
|
slide_in_curve: outCubic
|
||||||
slide_out_curve: inCubic
|
slide_out_curve: inCubic
|
||||||
|
|
||||||
|
|||||||
@@ -89,6 +89,9 @@ namespace GlobalInputs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void onNextShader() {
|
void onNextShader() {
|
||||||
|
// F5/F6 només tenen sentit quan els shaders estan actius. Si no,
|
||||||
|
// ignorem la pulsació en silenci — l'usuari ha de prémer F4 abans.
|
||||||
|
if (!Options::video().shader.enabled) { return; }
|
||||||
const std::string NEW_NAME = (Options::video().shader.current_shader == "crtpi") ? "postfx" : "crtpi";
|
const std::string NEW_NAME = (Options::video().shader.current_shader == "crtpi") ? "postfx" : "crtpi";
|
||||||
Options::setActiveShaderName(NEW_NAME);
|
Options::setActiveShaderName(NEW_NAME);
|
||||||
OptionsApply::reapplyShader();
|
OptionsApply::reapplyShader();
|
||||||
@@ -98,6 +101,7 @@ namespace GlobalInputs {
|
|||||||
// Busca l'entrada actual al vector de presets i passa a la següent
|
// Busca l'entrada actual al vector de presets i passa a la següent
|
||||||
// (wrap-around). Si no en troba cap s'evita el canvi silenciosament.
|
// (wrap-around). Si no en troba cap s'evita el canvi silenciosament.
|
||||||
void onNextPreset() {
|
void onNextPreset() {
|
||||||
|
if (!Options::video().shader.enabled) { return; }
|
||||||
const bool IS_CRTPI = Options::video().shader.current_shader == "crtpi";
|
const bool IS_CRTPI = Options::video().shader.current_shader == "crtpi";
|
||||||
std::string new_preset;
|
std::string new_preset;
|
||||||
if (IS_CRTPI) {
|
if (IS_CRTPI) {
|
||||||
|
|||||||
@@ -808,6 +808,12 @@ namespace Options {
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto buildActiveShader() -> Rendering::ShaderType {
|
auto buildActiveShader() -> Rendering::ShaderType {
|
||||||
|
// Si el shader està deshabilitat, forcem POSTFX. El backend tracta
|
||||||
|
// POSTFX amb params a zero com a passthrough; CRTPI, en canvi, manté
|
||||||
|
// el seu pipeline encara amb params buits (no és passthrough), així
|
||||||
|
// que mai s'ha d'arribar al pipeline de CRTPI quan l'usuari ha apagat
|
||||||
|
// els shaders, ni des d'F4 ni des del menú de servei.
|
||||||
|
if (!g_video.shader.enabled) { return Rendering::ShaderType::POSTFX; }
|
||||||
if (g_video.shader.current_shader == "crtpi") {
|
if (g_video.shader.current_shader == "crtpi") {
|
||||||
return Rendering::ShaderType::CRTPI;
|
return Rendering::ShaderType::CRTPI;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user