From 000f2e2923da84e6b7f1e4d48b9e803a203a4461 Mon Sep 17 00:00:00 2001 From: "SND\\weimingzhi_cp" Date: Tue, 21 Sep 2010 02:06:34 +0000 Subject: git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@57465 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- libpcsxcore/psxcommon.c | 17 +++++++++++++++++ libpcsxcore/psxmem.c | 10 ---------- 2 files changed, 17 insertions(+), 10 deletions(-) (limited to 'libpcsxcore') diff --git a/libpcsxcore/psxcommon.c b/libpcsxcore/psxcommon.c index f118c2db..797625a7 100644 --- a/libpcsxcore/psxcommon.c +++ b/libpcsxcore/psxcommon.c @@ -34,11 +34,28 @@ int EmuInit() { return psxInit(); } +static void LoadLibPS() { + char buf[MAXPATHLEN]; + FILE *f; + + // Load Net Yaroze runtime library (if exists) + sprintf(buf, "%s/libps.exe", Config.BiosDir); + f = fopen(buf, "rb"); + + if (f != NULL) { + fseek(f, 0x800, SEEK_SET); + fread(psxM + 0x10000, 0x61000, 1, f); + fclose(f); + } +} + void EmuReset() { FreeCheatSearchResults(); FreeCheatSearchMem(); psxReset(); + + LoadLibPS(); } void EmuShutdown() { diff --git a/libpcsxcore/psxmem.c b/libpcsxcore/psxmem.c index f46e7261..aa405ca6 100644 --- a/libpcsxcore/psxmem.c +++ b/libpcsxcore/psxmem.c @@ -127,16 +127,6 @@ void psxMemReset() { Config.HLE = FALSE; } } else Config.HLE = TRUE; - - // Load Net Yaroze runtime library (if exists) - sprintf(bios, "%s/libps.exe", Config.BiosDir); - f = fopen(bios, "rb"); - - if (f != NULL) { - fseek(f, 0x800, SEEK_SET); - fread(psxM + 0x10000, 0x61000, 1, f); - fclose(f); - } } void psxMemShutdown() { -- cgit v1.2.3