Qt: Fix regression where loading BIOS creates a save file (fixes #3359)

This commit is contained in:
Vicki Pfau 2025-01-21 00:50:34 -08:00
parent 2dd11712db
commit 92e10f31ea
4 changed files with 7 additions and 0 deletions

View File

@ -32,6 +32,7 @@ Other fixes:
- mGUI: Load parent directory if last used directory is missing (fixes mgba.io/i/3379)
- Qt: Fix savestate preview sizes with different scales (fixes mgba.io/i/2560)
- Qt: Fix potential crash when configuring shortcuts
- Qt: Fix regression where loading BIOS creates a save file (fixes mgba.io/i/3359)
Misc:
- Core: Handle relative paths for saves, screenshots, etc consistently (fixes mgba.io/i/2826)
- Core: Improve rumble emulation by averaging state over entire frame (fixes mgba.io/i/3232)

View File

@ -1267,6 +1267,9 @@ void CoreController::finishFrame() {
}
void CoreController::updatePlayerSave() {
if (m_saveBlocked) {
return;
}
int savePlayerId = m_multiplayer->saveId(this);
QString saveSuffix;

View File

@ -176,6 +176,7 @@ public slots:
void scanCards(const QStringList&);
void replaceGame(const QString&);
void yankPak();
void blockSave() { m_saveBlocked = true; }
void addKey(int key);
void clearKey(int key);
@ -263,6 +264,7 @@ private:
bool m_patched = false;
bool m_preload = false;
bool m_saveBlocked = false;
uint32_t m_crc32;
QString m_internalTitle;

View File

@ -169,6 +169,7 @@ CoreController* CoreManager::loadBIOS(int platform, const QString& path) {
mDirectorySetAttachBase(&core->dirs, VDirOpen(bytes.constData()));
CoreController* cc = new CoreController(core);
cc->blockSave();
if (m_multiplayer) {
cc->setMultiplayerController(m_multiplayer);
}