diff options
Diffstat (limited to 'libpsn00b/psxetc')
| -rw-r--r-- | libpsn00b/psxetc/dl.c | 6 |
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 |
