mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-06 03:25:36 +00:00
PostProcessing/FX: Allow frametime as int
But the value will be bogus.
This commit is contained in:
parent
eca113cd76
commit
4e7fdc8dbd
@ -818,13 +818,14 @@ bool PostProcessing::ReShadeFXShader::GetSourceOption(const reshadefx::uniform&
|
|||||||
}
|
}
|
||||||
else if (source == "frametime")
|
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(),
|
Error::SetStringFmt(error, "Unexpected type '{}' for timer source in uniform '{}'", ui.type.description(),
|
||||||
ui.name);
|
ui.name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If it's an integer type, value is going to be garbage, user can deal with it.
|
||||||
*si = SourceOptionType::FrameTime;
|
*si = SourceOptionType::FrameTime;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user