Avoid redundant core option checking.

This commit is contained in:
Themaister 2013-05-11 20:09:06 +02:00
parent e0fe7ddf7b
commit c4327da426

View File

@ -158,7 +158,6 @@ static void handle_input()
static void update_variables()
{
static char last_value[256];
retro_variable var;
var.key = "modelviewer_resolution";
var.value = NULL;
@ -166,17 +165,12 @@ static void update_variables()
if (!environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || !var.value)
return;
if (strcmp(last_value, var.value) == 0)
return;
std::vector<std::string> list = String::split(var.value, "x");
if (list.size() != 2)
return;
width = String::stoi(list[0]);
height = String::stoi(list[1]);
snprintf(last_value, sizeof(last_value), "%s", var.value);
}
void retro_run(void)