From: CometHunter92 <83950018+CometHunter92@users.noreply.github.com> Date: Fri, 1 Apr 2022 13:56:00 +0000 (+0200) Subject: fixes core options getting crazy if coming from a previous core version X-Git-Tag: r24l~483^2~1 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10a3edb5729a92eaeadfe77866f7f0ee700a9f1f;p=pcsx_rearmed.git fixes core options getting crazy if coming from a previous core version --- diff --git a/frontend/libretro.c b/frontend/libretro.c index 5a357bbf..0b306a2f 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -1554,8 +1554,8 @@ static void update_variables(bool in_flight) #endif frameskip_type_t prev_frameskip_type; - var.key = "pcsx_rearmed_frameskip_type"; var.value = NULL; + var.key = "pcsx_rearmed_frameskip_type"; prev_frameskip_type = frameskip_type; frameskip_type = FRAMESKIP_NONE; @@ -1573,22 +1573,20 @@ static void update_variables(bool in_flight) if (frameskip_type != 0) pl_rearmed_cbs.frameskip = -1; - - var.key = "pcsx_rearmed_frameskip_threshold"; + var.value = NULL; - - frameskip_threshold = 30; - + var.key = "pcsx_rearmed_frameskip_threshold"; if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) - frameskip_threshold = strtol(var.value, NULL, 10); + { + frameskip_threshold = strtol(var.value, NULL, 10); + } - var.key = "pcsx_rearmed_frameskip"; var.value = NULL; - - frameskip_interval = 3; - + var.key = "pcsx_rearmed_frameskip_interval"; if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) - frameskip_interval = strtol(var.value, NULL, 10); + { + frameskip_interval = strtol(var.value, NULL, 10); + } var.value = NULL; var.key = "pcsx_rearmed_region"; diff --git a/frontend/libretro_core_options.h b/frontend/libretro_core_options.h index e261fa19..d84bfeb4 100644 --- a/frontend/libretro_core_options.h +++ b/frontend/libretro_core_options.h @@ -89,7 +89,7 @@ struct retro_core_option_definition option_defs_us[] = { "33" }, { - "pcsx_rearmed_frameskip", + "pcsx_rearmed_frameskip_interval", "Frameskip Interval", "Specifies the maximum number of frames that can be skipped before a new frame is rendered.", { @@ -105,7 +105,7 @@ struct retro_core_option_definition option_defs_us[] = { { "10", NULL }, { NULL, NULL }, }, - "3" + "1" }, { "pcsx_rearmed_bios",