Commit 49cdbf05 authored by Vladimir Serbinenko's avatar Vladimir Serbinenko
Browse files

Fix a bug that results in 60fps if any options are changed

parent 16a1d7dc
......@@ -715,21 +715,23 @@ static void update_variables(bool startup)
var.key = "tyrquake_framerate";
var.value = NULL;
if (startup && environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var))
if (startup)
{
if (!strcmp(var.value, "auto"))
{
float target_framerate = 0.0f;
if (!environ_cb(RETRO_ENVIRONMENT_GET_TARGET_REFRESH_RATE,
&target_framerate))
target_framerate = 60.0f;
framerate = target_framerate;
}
else
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var)) {
if (!strcmp(var.value, "auto"))
{
float target_framerate = 0.0f;
if (!environ_cb(RETRO_ENVIRONMENT_GET_TARGET_REFRESH_RATE,
&target_framerate))
target_framerate = 60.0f;
framerate = target_framerate;
}
else
framerate = atof(var.value);
}
else
framerate = 60.0f;
}
else
framerate = 60.0f;
var.key = "tyrquake_colored_lighting";
var.value = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment