mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix patch loading while a game is running
This commit is contained in:
parent
ed9fa2b118
commit
de4b735409
1
CHANGES
1
CHANGES
|
@ -168,6 +168,7 @@ Bugfixes:
|
||||||
- Qt: Fix translation initialization (fixes mgba.io/i/776)
|
- Qt: Fix translation initialization (fixes mgba.io/i/776)
|
||||||
- PSP2: Use custom localtime_r since newlib version is broken (fixes mgba.io/i/560)
|
- PSP2: Use custom localtime_r since newlib version is broken (fixes mgba.io/i/560)
|
||||||
- GBA SIO: Improve SIO Normal dummy driver (fixes mgba.io/i/520)
|
- GBA SIO: Improve SIO Normal dummy driver (fixes mgba.io/i/520)
|
||||||
|
- Qt: Fix patch loading while a game is running
|
||||||
Misc:
|
Misc:
|
||||||
- Qt: Add language selector
|
- Qt: Add language selector
|
||||||
- GBA Timer: Improve accuracy of timers
|
- GBA Timer: Improve accuracy of timers
|
||||||
|
|
|
@ -543,10 +543,16 @@ void GameController::replaceGame(const QString& path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameController::loadPatch(const QString& path) {
|
void GameController::loadPatch(const QString& path) {
|
||||||
if (m_gameOpen) {
|
if (isLoaded()) {
|
||||||
closeGame();
|
closeGame();
|
||||||
m_patch = path;
|
}
|
||||||
openGame();
|
if (m_gameOpen) {
|
||||||
|
QTimer::singleShot(10, this, [this, path]() {
|
||||||
|
loadPatch(path);
|
||||||
|
if (!m_gameOpen) {
|
||||||
|
openGame();
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
m_patch = path;
|
m_patch = path;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue