mirror of https://github.com/mgba-emu/mgba.git
Core: Suspend runloop when a core crashes
This commit is contained in:
parent
29115e711b
commit
2a316ee1dc
1
CHANGES
1
CHANGES
|
@ -12,6 +12,7 @@ Other fixes:
|
||||||
- Qt: Fix applying savetype-only overrides
|
- Qt: Fix applying savetype-only overrides
|
||||||
- Util: Fix loading UPS patches that affect the last byte of the file
|
- Util: Fix loading UPS patches that affect the last byte of the file
|
||||||
Misc:
|
Misc:
|
||||||
|
- Core: Suspend runloop when a core crashes
|
||||||
- Qt: Rearrange menus some
|
- Qt: Rearrange menus some
|
||||||
- Util: Improve speed of UPS patch loading
|
- Util: Improve speed of UPS patch loading
|
||||||
|
|
||||||
|
|
|
@ -55,13 +55,13 @@ enum mCoreThreadState {
|
||||||
mTHREAD_INTERRUPTED,
|
mTHREAD_INTERRUPTED,
|
||||||
mTHREAD_PAUSED,
|
mTHREAD_PAUSED,
|
||||||
mTHREAD_MIN_WAITING = mTHREAD_INTERRUPTED,
|
mTHREAD_MIN_WAITING = mTHREAD_INTERRUPTED,
|
||||||
|
mTHREAD_CRASHED,
|
||||||
mTHREAD_MAX_WAITING = mTHREAD_PAUSED,
|
mTHREAD_MAX_WAITING = mTHREAD_PAUSED,
|
||||||
|
|
||||||
mTHREAD_INTERRUPTING,
|
mTHREAD_INTERRUPTING,
|
||||||
mTHREAD_EXITING,
|
mTHREAD_EXITING,
|
||||||
|
|
||||||
mTHREAD_SHUTDOWN,
|
mTHREAD_SHUTDOWN
|
||||||
mTHREAD_CRASHED
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum mCoreThreadRequest {
|
enum mCoreThreadRequest {
|
||||||
|
|
|
@ -189,6 +189,7 @@ CoreController::CoreController(mCore* core, QObject* parent)
|
||||||
message = QString().vsprintf(format, args);
|
message = QString().vsprintf(format, args);
|
||||||
QMetaObject::invokeMethod(controller, "logPosted", Q_ARG(int, level), Q_ARG(int, category), Q_ARG(const QString&, message));
|
QMetaObject::invokeMethod(controller, "logPosted", Q_ARG(int, level), Q_ARG(int, category), Q_ARG(const QString&, message));
|
||||||
if (level == mLOG_FATAL) {
|
if (level == mLOG_FATAL) {
|
||||||
|
mCoreThreadMarkCrashed(controller->thread());
|
||||||
QMetaObject::invokeMethod(controller, "crashed", Q_ARG(const QString&, QString().vsprintf(format, args)));
|
QMetaObject::invokeMethod(controller, "crashed", Q_ARG(const QString&, QString().vsprintf(format, args)));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue