diff --git a/CHANGES b/CHANGES index 6c543b26b..546cc40ad 100644 --- a/CHANGES +++ b/CHANGES @@ -25,6 +25,7 @@ Misc: - Qt: Include wayland QPA in AppImage (fixes mgba.io/i/2796) - Qt: Stop eating boolean action key events (fixes mgba.io/i/2636) - Qt: Automatically change video file extension as appropriate + - Qt: Swap P1 and other player's save if P1 loaded it first (closes mgba.io/i/2750) 0.10.1: (2023-01-10) Emulation fixes: diff --git a/src/platform/qt/CoreController.cpp b/src/platform/qt/CoreController.cpp index 2cdc22793..165350945 100644 --- a/src/platform/qt/CoreController.cpp +++ b/src/platform/qt/CoreController.cpp @@ -289,13 +289,6 @@ void CoreController::loadConfig(ConfigController* config) { mCoreConfigCopyValue(&m_threadContext.core->config, config->config(), "mute"); m_preload = config->getOption("preload").toInt(); - int playerId = m_multiplayer->playerId(this) + 1; - QVariant savePlayerId = config->getOption("savePlayerId"); - if (m_multiplayer->attached() < 2 && savePlayerId.canConvert()) { - playerId = savePlayerId.toInt(); - } - mCoreConfigSetOverrideIntValue(&m_threadContext.core->config, "savePlayerId", playerId); - QSize sizeBefore = screenDimensions(); m_activeBuffer.resize(256 * 224 * sizeof(color_t)); m_threadContext.core->setVideoBuffer(m_threadContext.core, reinterpret_cast(m_activeBuffer.data()), sizeBefore.width()); @@ -1216,7 +1209,12 @@ void CoreController::updatePlayerSave() { int savePlayerId = 0; mCoreConfigGetIntValue(&m_threadContext.core->config, "savePlayerId", &savePlayerId); if (savePlayerId == 0 || m_multiplayer->attached() > 1) { - savePlayerId = m_multiplayer->playerId(this) + 1; + if (savePlayerId == m_multiplayer->playerId(this) + 1) { + // Player 1 is using our save, so let's use theirs, at least for now. + savePlayerId = 1; + } else { + savePlayerId = m_multiplayer->playerId(this) + 1; + } } QString saveSuffix;