mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Don't schedule a finish event when not running.
Otherwise it'll get it when it does run, and stop early.
This commit is contained in:
parent
1633aa689c
commit
113146302b
2 changed files with 6 additions and 2 deletions
|
@ -344,7 +344,7 @@ void PSP_RunLoopUntil(u64 globalticks) {
|
|||
// 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));
|
||||
gpu->RunEventsUntil(CoreTiming::GetTicks() + msToCycles(1000));
|
||||
}
|
||||
} else {
|
||||
ERROR_LOG(CPU, "Unable to execute CPU run loop, unexpected state: %d", cpuThreadState);
|
||||
|
|
|
@ -130,7 +130,11 @@ struct ThreadEventQueue : public B {
|
|||
|
||||
void FinishEventLoop() {
|
||||
if (threadEnabled_) {
|
||||
ScheduleEvent(EVENT_FINISH);
|
||||
lock_guard guard(eventsLock_);
|
||||
// Don't schedule a finish if it's not even running.
|
||||
if (eventsRunning_) {
|
||||
ScheduleEvent(EVENT_FINISH);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue