mirror of
https://github.com/libretro/scenewalker-libretro.git
synced 2024-11-23 07:49:43 +00:00
Avoid redundant core option checking.
This commit is contained in:
parent
e0fe7ddf7b
commit
c4327da426
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user