mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
allow to disable SH2 dynarec on runtime
This commit is contained in:
parent
835122bc0c
commit
0185b67736
9 changed files with 80 additions and 24 deletions
|
@ -165,10 +165,7 @@ SRCS_COMMON += $(R)platform/libpicofe/linux/host_dasm.c
|
|||
LDFLAGS += -lbfd -lopcodes -liberty
|
||||
endif
|
||||
endif # use_sh2drc
|
||||
#
|
||||
ifeq "$(use_sh2mame)" "1"
|
||||
SRCS_COMMON += $(R)cpu/sh2/mame/sh2pico.c
|
||||
endif
|
||||
endif # !no_32x
|
||||
|
||||
OBJS_COMMON := $(SRCS_COMMON:.c=.o)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue