Qt: Disable attempted linking betwen incompatible platforms (fixes #2702)

This commit is contained in:
Vicki Pfau 2023-02-09 00:17:55 -08:00
parent cade5eebde
commit 3bacc33ebe
3 changed files with 7 additions and 0 deletions

View File

@ -18,6 +18,7 @@ Other fixes:
- Qt: Disable sync while running scripts from main thread (fixes mgba.io/i/2738)
- Qt: Fix savestate preview sizes with different scales (fixes mgba.io/i/2560)
- Qt: Properly cap number of attached players by platform (fixes mgba.io/i/2807)
- Qt: Disable attempted linking betwen incompatible platforms (fixes mgba.io/i/2702)
Misc:
- GB Serialize: Add missing savestate support for MBC6 and NT (newer)
- GBA: Improve detection of valid ELF ROMs

View File

@ -229,6 +229,9 @@ bool MultiplayerController::attachGame(CoreController* controller) {
default:
return false;
}
m_platform = controller->platform();
} else if (controller->platform() != m_platform) {
return false;
}
mCoreThread* thread = controller->thread();

View File

@ -9,6 +9,7 @@
#include <QMutex>
#include <QObject>
#include <mgba/core/core.h>
#include <mgba/core/lockstep.h>
#ifdef M_CORE_GBA
#include <mgba/internal/gba/sio/lockstep.h>
@ -77,6 +78,8 @@ private:
GBASIOLockstep m_gbaLockstep;
#endif
};
mPlatform m_platform = mPLATFORM_NONE;
QList<Player> m_players;
QMutex m_lock;
};