mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
Merge pull request #6514 from unknownbrackets/multithread
Fix a couple minor issues in multithreading
This commit is contained in:
commit
ac7b0ab7a1
@ -75,9 +75,13 @@ struct ThreadEventQueue : public B {
|
||||
eventsHaveRun_ = true;
|
||||
|
||||
do {
|
||||
if (!HasEvents()) {
|
||||
while (!HasEvents() && !ShouldExitEventLoop() && threadEnabled_) {
|
||||
eventsWait_.wait(eventsLock_);
|
||||
}
|
||||
// Quit the loop if the queue is drained and coreState has tripped, or threading is disabled.
|
||||
if (!HasEvents()) {
|
||||
break;
|
||||
}
|
||||
|
||||
for (Event ev = GetNextEvent(); EventType(ev) != EVENT_INVALID; ev = GetNextEvent()) {
|
||||
eventsLock_.unlock();
|
||||
@ -95,11 +99,6 @@ struct ThreadEventQueue : public B {
|
||||
}
|
||||
eventsLock_.lock();
|
||||
}
|
||||
|
||||
// Quit the loop if the queue is drained and coreState has tripped, or threading is disabled.
|
||||
if (ShouldExitEventLoop() || !threadEnabled_) {
|
||||
break;
|
||||
}
|
||||
} while (CoreTiming::GetTicks() < globalticks);
|
||||
|
||||
// This will force the waiter to check coreState, even if we didn't actually drain.
|
||||
|
@ -178,10 +178,13 @@ void EmuScreen::sendMessage(const char *message, const char *value) {
|
||||
PSP_Shutdown();
|
||||
bootPending_ = false;
|
||||
invalid_ = true;
|
||||
host->UpdateDisassembly();
|
||||
} else if (!strcmp(message, "reset")) {
|
||||
PSP_Shutdown();
|
||||
bootPending_ = true;
|
||||
invalid_ = true;
|
||||
host->UpdateDisassembly();
|
||||
|
||||
std::string resetError;
|
||||
if (!PSP_InitStart(PSP_CoreParameter(), &resetError)) {
|
||||
ELOG("Error resetting: %s", resetError.c_str());
|
||||
@ -189,13 +192,6 @@ void EmuScreen::sendMessage(const char *message, const char *value) {
|
||||
System_SendMessage("event", "failstartgame");
|
||||
return;
|
||||
}
|
||||
#ifndef MOBILE_DEVICE
|
||||
if (g_Config.bAutoRun) {
|
||||
Core_EnableStepping(false);
|
||||
} else {
|
||||
Core_EnableStepping(true);
|
||||
}
|
||||
#endif
|
||||
} else if (!strcmp(message, "boot")) {
|
||||
const char *ext = strrchr(value, '.');
|
||||
if (!strcmp(ext, ".ppst")) {
|
||||
|
Loading…
Reference in New Issue
Block a user