From 4e7fdc8dbd7488f68537ac179e48cfb8a703b473 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 6 Apr 2025 16:20:43 +1000 Subject: [PATCH] PostProcessing/FX: Allow frametime as int But the value will be bogus. --- src/util/postprocessing_shader_fx.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/postprocessing_shader_fx.cpp b/src/util/postprocessing_shader_fx.cpp index 9a5eb2b74..ed7959157 100644 --- a/src/util/postprocessing_shader_fx.cpp +++ b/src/util/postprocessing_shader_fx.cpp @@ -818,13 +818,14 @@ bool PostProcessing::ReShadeFXShader::GetSourceOption(const reshadefx::uniform& } else if (source == "frametime") { - if (ui.type.base != reshadefx::type::t_float || ui.type.components() > 1) + if ((!ui.type.is_integral() && !ui.type.is_floating_point()) || ui.type.components() > 1) { Error::SetStringFmt(error, "Unexpected type '{}' for timer source in uniform '{}'", ui.type.description(), ui.name); return false; } + // If it's an integer type, value is going to be garbage, user can deal with it. *si = SourceOptionType::FrameTime; return true; }