mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Remove redundant coreState check in asyncIOManager.
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
#include "Common/Serialize/SerializeSet.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/HW/AsyncIOManager.h"
|
||||
#include "Core/FileSystems/MetaFileSystem.h"
|
||||
|
||||
|
||||
@@ -148,6 +148,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// This is the threadfunc, really. Although it can also run on the main thread if threadEnabled_ is set.
|
||||
// TODO: Remove threadEnabled_, always be on a thread.
|
||||
void RunEventsUntil(u64 globalticks) {
|
||||
if (!threadEnabled_) {
|
||||
do {
|
||||
@@ -162,7 +164,7 @@ public:
|
||||
eventsRunning_ = true;
|
||||
eventsHaveRun_ = true;
|
||||
do {
|
||||
while (events_.empty() && !ShouldExitEventLoop()) {
|
||||
while (events_.empty()) {
|
||||
eventsWait_.wait(guard);
|
||||
}
|
||||
// Quit the loop if the queue is drained and coreState has tripped, or threading is disabled.
|
||||
@@ -236,10 +238,7 @@ public:
|
||||
|
||||
protected:
|
||||
void ProcessEvent(AsyncIOEvent ref);
|
||||
bool ShouldExitEventLoop() {
|
||||
return coreState == CORE_BOOT_ERROR || coreState == CORE_RUNTIME_ERROR || coreState == CORE_POWERDOWN;
|
||||
}
|
||||
|
||||
|
||||
inline void ProcessEventIfApplicable(AsyncIOEvent &ev, u64 &globalticks) {
|
||||
switch (AsyncIOEventType(ev)) {
|
||||
case IO_EVENT_FINISH:
|
||||
|
||||
Reference in New Issue
Block a user