From fe4a15b15c7810aeac45e4a0142d9ddbc11be6be Mon Sep 17 00:00:00 2001 From: Francisco Javier Trujillo Mata Date: Sat, 7 Sep 2024 00:45:15 +0200 Subject: [PATCH] Fix pthread support (#16970) * enabled pthread usage * unload modules before loading back --- Makefile.ps2 | 6 +++++- frontend/drivers/platform_ps2.c | 4 +--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile.ps2 b/Makefile.ps2 index cda6aee7aa..78b7975211 100644 --- a/Makefile.ps2 +++ b/Makefile.ps2 @@ -117,7 +117,11 @@ run: ps2client -h $(PS2_IP) execee host:$(EE_BIN) sim: - PCSX2 --elf=$(PWD)/$(EE_BIN) --nogui +ifeq ($(shell uname), Darwin) + /Applications/PCSX2.app/Contents/MacOS/PCSX2 -elf $(PWD)/$(EE_BIN) +else + PCSX2 -elf $(PWD)/$(EE_BIN) -nogui +endif debug: clean all run diff --git a/frontend/drivers/platform_ps2.c b/frontend/drivers/platform_ps2.c index 9f692b0299..8136c8c7e1 100644 --- a/frontend/drivers/platform_ps2.c +++ b/frontend/drivers/platform_ps2.c @@ -50,9 +50,6 @@ #define DEFAULT_PARTITION "hdd0:__common:pfs" #endif -// Disable pthread functionality -PS2_DISABLE_AUTOSTART_PTHREAD(); - static enum frontend_fork ps2_fork_mode = FRONTEND_FORK_NONE; static char cwd[FILENAME_MAX] = {0}; static char mountString[10] = {0}; @@ -343,6 +340,7 @@ static void frontend_ps2_exec(const char *path, bool should_load_game) RARCH_LOG("Attempt to load executable: [%s], partition [%s].\n", path, mountPoint); /* Reload IOP drivers for saving IOP ram */ + deinit_drivers(true, true); reset_IOP(); common_init_drivers(false); waitUntilDeviceIsReady(path);