notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix some edge case where core can freeze upon loading content
[pcsx_rearmed.git]
/
frontend
/
libretro.c
diff --git
a/frontend/libretro.c
b/frontend/libretro.c
index
cc443fe
..
783f9cd
100644
(file)
--- a/
frontend/libretro.c
+++ b/
frontend/libretro.c
@@
-1227,6
+1227,7
@@
static void set_retro_memmap(void)
environ_cb(RETRO_ENVIRONMENT_SET_MEMORY_MAPS, &retromap);
}
environ_cb(RETRO_ENVIRONMENT_SET_MEMORY_MAPS, &retromap);
}
+static void update_variables(bool in_flight);
bool retro_load_game(const struct retro_game_info *info)
{
size_t i;
bool retro_load_game(const struct retro_game_info *info)
{
size_t i;
@@
-1422,6
+1423,8
@@
bool retro_load_game(const struct retro_game_info *info)
return false;
}
return false;
}
+ update_variables(false);
+
if (plugins_opened) {
ClosePlugins();
plugins_opened = 0;
if (plugins_opened) {
ClosePlugins();
plugins_opened = 0;
@@
-1772,14
+1775,19
@@
static void update_variables(bool in_flight)
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value)
{
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value)
{
- R3000Acpu *prev_cpu = psxCpu;
+ R3000Acpu *prev_cpu = psxCpu;
+#if defined(LIGHTREC)
+ bool can_use_dynarec = found_bios;
+#else
+ bool can_use_dynarec = 1;
+#endif
#ifdef _3DS
if(!__ctr_svchax)
Config.Cpu = CPU_INTERPRETER;
else
#endif
#ifdef _3DS
if(!__ctr_svchax)
Config.Cpu = CPU_INTERPRETER;
else
#endif
- if (strcmp(var.value, "disabled") == 0)
+ if (strcmp(var.value, "disabled") == 0
|| !can_use_dynarec
)
Config.Cpu = CPU_INTERPRETER;
else if (strcmp(var.value, "enabled") == 0)
Config.Cpu = CPU_DYNAREC;
Config.Cpu = CPU_INTERPRETER;
else if (strcmp(var.value, "enabled") == 0)
Config.Cpu = CPU_DYNAREC;
@@
-1852,6
+1860,18
@@
static void update_variables(bool in_flight)
Config.VSyncWA = 1;
}
Config.VSyncWA = 1;
}
+#ifndef _WIN32
+ var.value = NULL;
+ var.key = "pcsx_rearmed_async_cd";
+ if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value)
+ {
+ if (strcmp(var.value, "async") == 0)
+ Config.AsyncCD = 1;
+ else
+ Config.AsyncCD = 0;
+ }
+#endif
+
var.value = NULL;
var.key = "pcsx_rearmed_noxadecoding";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value)
var.value = NULL;
var.key = "pcsx_rearmed_noxadecoding";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value)
@@
-2745,13
+2765,15
@@
void retro_init(void)
if (environ_cb(RETRO_ENVIRONMENT_GET_INPUT_BITMASKS, NULL))
libretro_supports_bitmasks = true;
if (environ_cb(RETRO_ENVIRONMENT_GET_INPUT_BITMASKS, NULL))
libretro_supports_bitmasks = true;
- update_variables(false);
check_system_specs();
}
void retro_deinit(void)
{
check_system_specs();
}
void retro_deinit(void)
{
- ClosePlugins();
+ if (plugins_opened) {
+ ClosePlugins();
+ plugins_opened = 0;
+ }
SysClose();
#ifdef _3DS
linearFree(vout_buf);
SysClose();
#ifdef _3DS
linearFree(vout_buf);