mirror of https://github.com/mgba-emu/mgba.git
Qt: Only show emulator restart warning once per settings saving
This commit is contained in:
parent
e8fe5684f7
commit
4cf401c391
1
CHANGES
1
CHANGES
|
@ -52,6 +52,7 @@ Other fixes:
|
||||||
- Qt: Fix race conditions initializing GDB stub
|
- Qt: Fix race conditions initializing GDB stub
|
||||||
- GBA: Set up GPIO mapping on null and ELF ROM regions (fixes mgba.io/i/1481)
|
- GBA: Set up GPIO mapping on null and ELF ROM regions (fixes mgba.io/i/1481)
|
||||||
- GBA Cheats: Fix value incrementing in CB slide codes (fixes mgba.io/i/1501)
|
- GBA Cheats: Fix value incrementing in CB slide codes (fixes mgba.io/i/1501)
|
||||||
|
- Qt: Only show emulator restart warning once per settings saving
|
||||||
Misc:
|
Misc:
|
||||||
- GBA Savedata: EEPROM performance fixes
|
- GBA Savedata: EEPROM performance fixes
|
||||||
- GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
|
- GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
|
||||||
|
|
|
@ -152,6 +152,8 @@ Window::Window(CoreManager* manager, ConfigController* config, int playerId, QWi
|
||||||
m_log.load(m_config);
|
m_log.load(m_config);
|
||||||
m_fpsTimer.setInterval(FPS_TIMER_INTERVAL);
|
m_fpsTimer.setInterval(FPS_TIMER_INTERVAL);
|
||||||
m_focusCheck.setInterval(200);
|
m_focusCheck.setInterval(200);
|
||||||
|
m_mustRestart.setInterval(MUST_RESTART_TIMEOUT);
|
||||||
|
m_mustRestart.setSingleShot(true);
|
||||||
|
|
||||||
m_shortcutController->setConfigController(m_config);
|
m_shortcutController->setConfigController(m_config);
|
||||||
m_shortcutController->setActionMapper(&m_actions);
|
m_shortcutController->setActionMapper(&m_actions);
|
||||||
|
@ -970,6 +972,10 @@ void Window::tryMakePortable() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::mustRestart() {
|
void Window::mustRestart() {
|
||||||
|
if (m_mustRestart.isActive()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
m_mustRestart.start();
|
||||||
QMessageBox* dialog = new QMessageBox(QMessageBox::Warning, tr("Restart needed"),
|
QMessageBox* dialog = new QMessageBox(QMessageBox::Warning, tr("Restart needed"),
|
||||||
tr("Some changes will not take effect until the emulator is restarted."),
|
tr("Some changes will not take effect until the emulator is restarted."),
|
||||||
QMessageBox::Ok, this, Qt::Sheet);
|
QMessageBox::Ok, this, Qt::Sheet);
|
||||||
|
|
|
@ -145,6 +145,7 @@ private slots:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int FPS_TIMER_INTERVAL = 2000;
|
static const int FPS_TIMER_INTERVAL = 2000;
|
||||||
|
static const int MUST_RESTART_TIMEOUT = 10000;
|
||||||
|
|
||||||
void setupMenu(QMenuBar*);
|
void setupMenu(QMenuBar*);
|
||||||
void openStateWindow(LoadSave);
|
void openStateWindow(LoadSave);
|
||||||
|
@ -199,6 +200,7 @@ private:
|
||||||
QList<qint64> m_frameList;
|
QList<qint64> m_frameList;
|
||||||
QElapsedTimer m_frameTimer;
|
QElapsedTimer m_frameTimer;
|
||||||
QTimer m_fpsTimer;
|
QTimer m_fpsTimer;
|
||||||
|
QTimer m_mustRestart;
|
||||||
QList<QString> m_mruFiles;
|
QList<QString> m_mruFiles;
|
||||||
ShortcutController* m_shortcutController;
|
ShortcutController* m_shortcutController;
|
||||||
#if defined(BUILD_GL) || defined(BUILD_GLES2)
|
#if defined(BUILD_GL) || defined(BUILD_GLES2)
|
||||||
|
|
Loading…
Reference in New Issue