Add a simple message event system to the GE.

With this, the CPU thread feature now mostly works.
This commit is contained in:
Unknown W. Brackets committed 2013-08-09 22:41:31 -07:00
1 parent 52ca93aab2
commit 02e301e5fe
7 files changed
+169 -19

No files matched your search

+5 -2
View File
@@ -274,8 +274,11 @@ void PSP_RunLoopUntil(u64 globalticks) {
if (g_Config.bUseCPUThread) {
cpuThreadUntil = globalticks;
if (CPU_NextState(CPU_THREAD_RUNNING, CPU_THREAD_EXECUTE)) {
// TODO: Run GPU here.
CPU_WaitStatus(&CPU_IsReady);
// The CPU doesn't actually respect cpuThreadUntil well, especially when skipping frames.
// TODO: Something smarter? Or force CPU to bail periodically?
while (!CPU_IsReady()) {
gpu->RunEventsUntil(CoreTiming::GetTicks() + msToCycles(100));
}
} else {
ERROR_LOG(CPU, "Unable to execute CPU run loop, unexpected state: %d", cpuThreadState);
}