diff options
Diffstat (limited to 'patches/snes9x2005/0001-frameskip-interval.patch')
-rw-r--r-- | patches/snes9x2005/0001-frameskip-interval.patch | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/patches/snes9x2005/0001-frameskip-interval.patch b/patches/snes9x2005/0001-frameskip-interval.patch index 0025b76..f1c431d 100644 --- a/patches/snes9x2005/0001-frameskip-interval.patch +++ b/patches/snes9x2005/0001-frameskip-interval.patch @@ -1,8 +1,8 @@ diff --git a/libretro.c b/libretro.c -index c368d8f..305adee 100644 +index 9b4599e..c768c42 100644 --- a/libretro.c +++ b/libretro.c -@@ -57,13 +57,11 @@ static int32_t samplerate = (((SNES_CLOCK_SPEED * 6) / (32 * ONE_APU_CYCLE))); +@@ -58,13 +58,11 @@ static int32_t samplerate = (((SNES_CLOCK_SPEED * 6) / (32 * ONE_APU_CYCLE))); static unsigned frameskip_type = 0; static unsigned frameskip_threshold = 0; static uint16_t frameskip_counter = 0; @@ -17,7 +17,7 @@ index c368d8f..305adee 100644 static unsigned retro_audio_latency = 0; static bool update_audio_latency = false; -@@ -341,6 +339,7 @@ void retro_deinit(void) +@@ -345,6 +343,7 @@ void retro_deinit(void) frameskip_type = 0; frameskip_threshold = 0; frameskip_counter = 0; @@ -25,7 +25,7 @@ index c368d8f..305adee 100644 retro_audio_buff_active = false; retro_audio_buff_occupancy = 0; retro_audio_buff_underrun = false; -@@ -414,7 +413,7 @@ static void check_variables(bool first_run) +@@ -418,7 +417,7 @@ static void check_variables(bool first_run) { if (strcmp(var.value, "auto") == 0) frameskip_type = 1; @@ -34,11 +34,11 @@ index c368d8f..305adee 100644 frameskip_type = 2; } -@@ -426,6 +425,14 @@ static void check_variables(bool first_run) +@@ -430,6 +429,14 @@ static void check_variables(bool first_run) if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) frameskip_threshold = strtol(var.value, NULL, 10); -+ var.key = "catsfc_frameskip_interval"; ++ var.key = "snes9x_2005_frameskip_interval"; + var.value = NULL; + + frameskip_interval = 4; @@ -46,10 +46,10 @@ index c368d8f..305adee 100644 + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) + frameskip_interval = strtol(var.value, NULL, 10); + - var.key = "catsfc_overclock_cycles"; + var.key = "snes9x_2005_overclock_cycles"; var.value = NULL; -@@ -531,7 +538,7 @@ void retro_run(void) +@@ -535,7 +542,7 @@ void retro_run(void) if (skip_frame) { @@ -59,12 +59,12 @@ index c368d8f..305adee 100644 IPPU.RenderThisFrame = false; frameskip_counter++; diff --git a/libretro_core_options.h b/libretro_core_options.h -index 032cefd..14bf8d8 100644 +index 9b89154..41d5ff1 100644 --- a/libretro_core_options.h +++ b/libretro_core_options.h -@@ -71,9 +71,9 @@ struct retro_core_option_definition option_defs_us[] = { - "Frameskip", - "Skip frames to avoid audio buffer under-run (crackling). Improves performance at the expense of visual smoothness. 'Auto' skips frames when advised by the frontend. 'Manual' utilises the 'Frameskip Threshold (%)' setting.", +@@ -87,9 +87,9 @@ struct retro_core_option_v2_definition option_defs_us[] = { + NULL, + NULL, { - { "disabled", NULL }, - { "auto", "Auto" }, @@ -75,14 +75,17 @@ index 032cefd..14bf8d8 100644 { NULL, NULL }, }, "disabled" -@@ -103,6 +103,26 @@ struct retro_core_option_definition option_defs_us[] = { +@@ -122,6 +122,29 @@ struct retro_core_option_v2_definition option_defs_us[] = { }, "33" }, + { -+ "catsfc_frameskip_interval", ++ "snes9x_2005_frameskip_interval", + "Frameskip Interval", ++ NULL, + "The maximum number of frames that can be skipped before a new frame is rendered.", ++ NULL, ++ NULL, + { + { "0", NULL }, + { "1", NULL }, @@ -100,5 +103,5 @@ index 032cefd..14bf8d8 100644 + "4" + }, { - "catsfc_overclock_cycles", + "snes9x_2005_overclock_cycles", "Reduce Slowdown (Hack, Unsafe, Restart)", |