aboutsummaryrefslogtreecommitdiff
path: root/libretro.c
diff options
context:
space:
mode:
authorTwinaphex2018-02-08 13:29:05 +0100
committerGitHub2018-02-08 13:29:05 +0100
commit8e71246886c0957e047571743ec524ff4c83a53e (patch)
tree98fc390a7c4f2205bf896a9e5f685856790e4775 /libretro.c
parente2ad3dfa3500e39f5aab98c6070cf206702d4d40 (diff)
parent5a20ff0dc7c6a2fcde0b1e382f3d5a92aefa4ab9 (diff)
downloadsnes9x2005-8e71246886c0957e047571743ec524ff4c83a53e.tar.gz
snes9x2005-8e71246886c0957e047571743ec524ff4c83a53e.tar.bz2
snes9x2005-8e71246886c0957e047571743ec524ff4c83a53e.zip
Merge pull request #49 from Tatsuya79/master
Overclock by reducing cycles.
Diffstat (limited to 'libretro.c')
-rw-r--r--libretro.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libretro.c b/libretro.c
index 0114559..42e316d 100644
--- a/libretro.c
+++ b/libretro.c
@@ -36,6 +36,7 @@ struct retro_perf_callback perf_cb;
char retro_save_directory[PATH_MAX];
char retro_base_name[PATH_MAX];
+bool overclock_cycles = false;
#ifdef _WIN32
char slash = '\\';
@@ -294,6 +295,7 @@ void retro_init(void)
static const struct retro_variable vars[] =
{
{ "catsfc_VideoMode", "Video Mode; auto|NTSC|PAL" },
+ { "catsfc_overclock_cycles", "CPU Overclock (Hack, Unsafe, Restart); disabled|enabled" },
{ NULL, NULL },
};
@@ -378,6 +380,17 @@ static void check_variables(void)
Settings.ForceNTSC = !strcmp(var.value, "NTSC");
Settings.ForcePAL = !strcmp(var.value, "PAL");
}
+
+ var.key = "catsfc_overclock_cycles";
+ var.value = NULL;
+
+ if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
+ {
+ if (strcmp(var.value, "enabled") == 0)
+ overclock_cycles = true;
+ else
+ overclock_cycles = false;
+ }
}
#ifdef PSP