mirror of https://github.com/mgba-emu/mgba.git
Qt: Add confirmation for making portable
This commit is contained in:
parent
f0c8c246cc
commit
9911484aee
|
@ -561,6 +561,15 @@ void Window::unimplementedBiosCall(int call) {
|
||||||
fail->show();
|
fail->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Window::tryMakePortable() {
|
||||||
|
QMessageBox* confirm = new QMessageBox(QMessageBox::Question, tr("Really make portable?"),
|
||||||
|
tr("This will make the emulator load its configuration from the same directory as the executable. Do you want to continue?"),
|
||||||
|
QMessageBox::Yes | QMessageBox::Cancel, this, Qt::Sheet);
|
||||||
|
confirm->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
connect(confirm->button(QMessageBox::Yes), SIGNAL(clicked()), m_config, SLOT(makePortable()));
|
||||||
|
confirm->show();
|
||||||
|
}
|
||||||
|
|
||||||
void Window::recordFrame() {
|
void Window::recordFrame() {
|
||||||
m_frameList.append(QDateTime::currentDateTime());
|
m_frameList.append(QDateTime::currentDateTime());
|
||||||
while (m_frameList.count() > FRAME_LIST_SIZE) {
|
while (m_frameList.count() > FRAME_LIST_SIZE) {
|
||||||
|
@ -642,7 +651,7 @@ void Window::setupMenu(QMenuBar* menubar) {
|
||||||
|
|
||||||
fileMenu->addSeparator();
|
fileMenu->addSeparator();
|
||||||
|
|
||||||
addControlledAction(fileMenu, fileMenu->addAction(tr("Make portable"), m_config, SLOT(makePortable())), "makePortable");
|
addControlledAction(fileMenu, fileMenu->addAction(tr("Make portable"), this, SLOT(tryMakePortable())), "makePortable");
|
||||||
|
|
||||||
fileMenu->addSeparator();
|
fileMenu->addSeparator();
|
||||||
|
|
||||||
|
|
|
@ -115,6 +115,8 @@ private slots:
|
||||||
void gameFailed();
|
void gameFailed();
|
||||||
void unimplementedBiosCall(int);
|
void unimplementedBiosCall(int);
|
||||||
|
|
||||||
|
void tryMakePortable();
|
||||||
|
|
||||||
void recordFrame();
|
void recordFrame();
|
||||||
void showFPS();
|
void showFPS();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue