mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-01 02:03:47 +01:00
Defer HLE interrupts, vblank only when enabled.
Based on tests, vblank doesn't queue up (makes sense) while interrupts are disabled. I'm not 100% sure about the GPU stuff but it seems to only come from HLE via sceGe, so this should fix those return values.
This commit is contained in:
1 parent
99b24720b8
commit
9034cfbfd3
8 files changed
+60
-20
No files matched your search
@@ -26,6 +26,7 @@
|
||||
#include "sceAudio.h"
|
||||
#include "sceKernelMemory.h"
|
||||
#include "sceKernelThread.h"
|
||||
#include "sceKernelInterrupt.h"
|
||||
#include "../MIPS/MIPSCodeUtils.h"
|
||||
|
||||
enum
|
||||
@@ -40,6 +41,8 @@ enum
|
||||
HLE_AFTER_ALL_CALLBACKS = 0x04,
|
||||
// Reschedule and process current thread's callbacks after the syscall.
|
||||
HLE_AFTER_RESCHED_CALLBACKS = 0x08,
|
||||
// Run interrupts (and probably reschedule) after the syscall.
|
||||
HLE_AFTER_RUN_INTERRUPTS = 0x10,
|
||||
};
|
||||
|
||||
static std::vector<HLEModule> moduleDB;
|
||||
@@ -231,11 +234,19 @@ void hleReSchedule(bool callbacks, const char *reason)
|
||||
hleAfterSyscall |= HLE_AFTER_RESCHED_CALLBACKS;
|
||||
}
|
||||
|
||||
void hleRunInterrupts()
|
||||
{
|
||||
hleAfterSyscall |= HLE_AFTER_RUN_INTERRUPTS;
|
||||
}
|
||||
|
||||
inline void hleFinishSyscall()
|
||||
{
|
||||
if ((hleAfterSyscall & HLE_AFTER_CURRENT_CALLBACKS) != 0)
|
||||
__KernelForceCallbacks();
|
||||
|
||||
if ((hleAfterSyscall & HLE_AFTER_RUN_INTERRUPTS) != 0)
|
||||
__RunOnePendingInterrupt();
|
||||
|
||||
// Rescheduling will also do HLE_AFTER_ALL_CALLBACKS.
|
||||
if ((hleAfterSyscall & HLE_AFTER_RESCHED_CALLBACKS) != 0)
|
||||
__KernelReSchedule(true, hleAfterSyscallReschedReason);
|
||||
|
||||
Reference in new issue
Block a user