Qt: Prompt for restart when changing display driver

This commit is contained in:
Jeffrey Pfau 2015-07-11 14:51:09 -07:00
parent 5749649b9c
commit 0496691c9b
2 changed files with 10 additions and 0 deletions

View File

@ -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) {

View File

@ -116,6 +116,7 @@ private slots:
void unimplementedBiosCall(int);
void tryMakePortable();
void mustRestart();
void recordFrame();
void showFPS();