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 b9a950fee7
commit 1164d5b470
3 changed files with 7 additions and 0 deletions

View File

@ -11,6 +11,7 @@ Other fixes:
- Qt: Fix crash when attempting to use OpenGL 2.1 to 3.1 (fixes mgba.io/i/2794)
- Qt: Disable sync while running scripts from main thread (fixes mgba.io/i/2738)
- 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:
- Qt: Include wayland QPA in AppImage (fixes mgba.io/i/2796)
- Qt: Stop eating boolean action key events (fixes mgba.io/i/2636)

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;
};