Core: Suspend runloop when a core crashes

This commit is contained in:
Vicki Pfau 2021-05-06 00:14:10 -07:00
parent 29115e711b
commit 2a316ee1dc
3 changed files with 4 additions and 2 deletions

View File

@ -12,6 +12,7 @@ Other fixes:
- Qt: Fix applying savetype-only overrides
- Util: Fix loading UPS patches that affect the last byte of the file
Misc:
- Core: Suspend runloop when a core crashes
- Qt: Rearrange menus some
- Util: Improve speed of UPS patch loading

View File

@ -55,13 +55,13 @@ enum mCoreThreadState {
mTHREAD_INTERRUPTED,
mTHREAD_PAUSED,
mTHREAD_MIN_WAITING = mTHREAD_INTERRUPTED,
mTHREAD_CRASHED,
mTHREAD_MAX_WAITING = mTHREAD_PAUSED,
mTHREAD_INTERRUPTING,
mTHREAD_EXITING,
mTHREAD_SHUTDOWN,
mTHREAD_CRASHED
mTHREAD_SHUTDOWN
};
enum mCoreThreadRequest {

View File

@ -189,6 +189,7 @@ CoreController::CoreController(mCore* core, QObject* parent)
message = QString().vsprintf(format, args);
QMetaObject::invokeMethod(controller, "logPosted", Q_ARG(int, level), Q_ARG(int, category), Q_ARG(const QString&, message));
if (level == mLOG_FATAL) {
mCoreThreadMarkCrashed(controller->thread());
QMetaObject::invokeMethod(controller, "crashed", Q_ARG(const QString&, QString().vsprintf(format, args)));
}
};