mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-30 19:24:23 +01:00
Add a class to manage IO on a separate thread.
Also separate the logic for exiting the loop based on coreState. IO and audio won't necessarily be tied to the frame.
This commit is contained in:
1 parent
da1c59fa75
commit
e6b42768fe
9 files changed
+189
-1
No files matched your search
@@ -74,7 +74,7 @@ struct ThreadEventQueue : public B {
|
||||
}
|
||||
|
||||
// Quit the loop if the queue is drained and coreState has tripped, or threading is disabled.
|
||||
if (coreState != CORE_RUNNING || !threadEnabled_) {
|
||||
if (ShouldExitEventLoop() || !threadEnabled_) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@ struct ThreadEventQueue : public B {
|
||||
|
||||
protected:
|
||||
virtual void ProcessEvent(Event ev) = 0;
|
||||
virtual bool ShouldExitEventLoop() = 0;
|
||||
|
||||
private:
|
||||
bool threadEnabled_;
|
||||
|
||||
Reference in new issue
Block a user