void Enqueue(SaveState::Operation op) { std::lock_guard<std::recursive_mutex> guard(mutex); pending.push_back(op); // Don't actually run it until next frame. // It's possible there might be a duplicate but it won't hurt us. needsProcess = true; Core_UpdateSingleStep(); }
void Core_UpdateState(CoreState newState) { if ((coreState == CORE_RUNNING || coreState == CORE_NEXTFRAME) && newState != CORE_RUNNING) coreStatePending = true; coreState = newState; Core_UpdateSingleStep(); }