aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/psxetc
diff options
context:
space:
mode:
authorspicyjpeg <thatspicyjpeg@gmail.com>2023-06-20 03:17:34 +0200
committerspicyjpeg <thatspicyjpeg@gmail.com>2023-06-20 03:17:34 +0200
commiteaea5649a0803cc4bfeb6d21ee9f4098d4b493fc (patch)
tree786f6edfae0c6affe0d7c7b222cd12f52578ca01 /libpsn00b/psxetc
parent7eed71a90bed67e4a987a9db55e15e9403523dca (diff)
downloadpsn00bsdk-eaea5649a0803cc4bfeb6d21ee9f4098d4b493fc.tar.gz
Fix IRQ bugs, PutDispEnv() PAL screen centering
Diffstat (limited to 'libpsn00b/psxetc')
-rw-r--r--libpsn00b/psxetc/dl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libpsn00b/psxetc/dl.c b/libpsn00b/psxetc/dl.c
index 06302e2..4fa1370 100644
--- a/libpsn00b/psxetc/dl.c
+++ b/libpsn00b/psxetc/dl.c
@@ -422,9 +422,11 @@ DLL *DL_CreateDLL(DLL *dll, void *ptr, size_t size, DL_ResolveMode mode) {
}
}
- EnterCriticalSection();
+ int _exit = EnterCriticalSection();
+
FlushCache();
- ExitCriticalSection();
+ if (_exit)
+ ExitCriticalSection();
// Call the DLL's global constructors. This is the same thing we'd do in
// _start() for regular executables, but we have to do it outside of the