Skip to content

Commit 65cb616

Browse files
committed
LIBRETRO: fix err, use strcmp for throttle var.val
1 parent 874c0c6 commit 65cb616

1 file changed

Lines changed: 22 additions & 2 deletions

File tree

libretro/core/libretro-core.cpp

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,29 @@ void update_prefs_retrocfg(void)
213213
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
214214
{
215215
if (strcmp(var.value, "none") == 0)
216+
{
216217
mainMenu_throttle = 0;
217-
else
218-
mainMenu_throttle = atoi(var.value/20);
218+
}
219+
if (strcmp(var.value, "20") == 0)
220+
{
221+
mainMenu_throttle = 1;
222+
}
223+
if (strcmp(var.value, "40") == 0)
224+
{
225+
mainMenu_throttle = 2;
226+
}
227+
if (strcmp(var.value, "60") == 0)
228+
{
229+
mainMenu_throttle = 3;
230+
}
231+
if (strcmp(var.value, "80") == 0)
232+
{
233+
mainMenu_throttle = 4;
234+
}
235+
if (strcmp(var.value, "100") == 0)
236+
{
237+
mainMenu_throttle = 5;
238+
}
219239

220240
}
221241

0 commit comments

Comments
 (0)