mirror of https://github.com/mgba-emu/mgba.git
Qt: Prompt for restart when changing display driver
This commit is contained in:
parent
5749649b9c
commit
0496691c9b
|
@ -296,6 +296,7 @@ void Window::openSettingsWindow() {
|
|||
SettingsView* settingsWindow = new SettingsView(m_config);
|
||||
connect(settingsWindow, SIGNAL(biosLoaded(const QString&)), m_controller, SLOT(loadBIOS(const QString&)));
|
||||
connect(settingsWindow, SIGNAL(audioDriverChanged()), m_controller, SLOT(reloadAudioDriver()));
|
||||
connect(settingsWindow, SIGNAL(displayDriverChanged()), this, SLOT(mustRestart()));
|
||||
openView(settingsWindow);
|
||||
}
|
||||
|
||||
|
@ -570,6 +571,14 @@ void Window::tryMakePortable() {
|
|||
confirm->show();
|
||||
}
|
||||
|
||||
void Window::mustRestart() {
|
||||
QMessageBox* dialog = new QMessageBox(QMessageBox::Warning, tr("Restart needed"),
|
||||
tr("Some changes will not take effect until the emulator is restarted."),
|
||||
QMessageBox::Ok, this, Qt::Sheet);
|
||||
dialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
void Window::recordFrame() {
|
||||
m_frameList.append(QDateTime::currentDateTime());
|
||||
while (m_frameList.count() > FRAME_LIST_SIZE) {
|
||||
|
|
|
@ -116,6 +116,7 @@ private slots:
|
|||
void unimplementedBiosCall(int);
|
||||
|
||||
void tryMakePortable();
|
||||
void mustRestart();
|
||||
|
||||
void recordFrame();
|
||||
void showFPS();
|
||||
|
|
Loading…
Reference in New Issue