allow to disable SH2 dynarec on runtime

This commit is contained in:
notaz 2013-08-31 20:02:59 +03:00
parent 835122bc0c
commit 0185b67736
9 changed files with 80 additions and 24 deletions

View file

@ -185,6 +185,9 @@ void retro_set_environment(retro_environment_t cb)
//{ "region", "Region; Auto|NTSC|PAL" },
{ "picodrive_input1", "Input device 1; 3 button pad|6 button pad|None" },
{ "picodrive_input2", "Input device 2; 3 button pad|6 button pad|None" },
#ifdef DRC_SH2
{ "picodrive_drc", "Dynamic recompilers; enabled|disabled" },
#endif
{ NULL, NULL },
};
@ -688,6 +691,17 @@ static void update_variables(void)
var.key = "picodrive_input2";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
PicoSetInputDevice(1, input_name_to_val(var.value));
#ifdef DRC_SH2
var.value = NULL;
var.key = "picodrive_drc";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) {
if (strcmp(var.value, "enabled") == 0)
PicoOpt |= POPT_EN_DRC;
else
PicoOpt &= ~POPT_EN_DRC;
}
#endif
}
void retro_run(void)