1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-08 13:11:49 +00:00

meso: add KProcess::SetDebugPauseState

This commit is contained in:
TuxSH 2018-11-15 11:56:26 +01:00 committed by Michael Scire
parent 529024448e
commit 91662decf0
2 changed files with 15 additions and 0 deletions

View file

@ -39,6 +39,8 @@ class KProcess final : public KSynchronizationObject /* FIXME */ {
constexpr State GetState() const { return state; }
void SetDebugPauseState(bool pause);
KDebug *GetDebug() const { return debug; }
void SetDebug(KDebug *debug);
void ClearDebug(State attachState);

View file

@ -42,4 +42,17 @@ void KProcess::ClearDebug(KProcess::State attachState)
}
}
void KProcess::SetDebugPauseState(bool pause) {
if (pause && state == State::StartedAttached) {
state = State::DebugSuspended;
} else if (!pause && state == State::DebugSuspended) {
state = State::StartedAttached;
} else {
return;
}
stateChanged = true;
NotifyWaiters();
}
}