mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-11 01:08:39 +12:00
Qt: Bugfixes regarding usage of ShowConfirmationBox
This commit is contained in:
parent
232c6c3aaf
commit
48a847d1b6
2 changed files with 10 additions and 4 deletions
|
@ -456,15 +456,21 @@ bool gs_frame::event(QEvent* ev)
|
|||
toggle_fullscreen();
|
||||
}
|
||||
|
||||
int result;
|
||||
int result = QMessageBox::Yes;
|
||||
atomic_t<bool> called = false;
|
||||
|
||||
Emu.CallAfter([this, &result]()
|
||||
Emu.CallAfter([this, &result, &called]()
|
||||
{
|
||||
m_gui_settings->ShowConfirmationBox(tr("Exit Game?"),
|
||||
tr("Do you really want to exit the game?\n\nAny unsaved progress will be lost!\n"),
|
||||
gui::ib_confirm_exit, &result, nullptr);
|
||||
|
||||
called = true;
|
||||
called.notify_one();
|
||||
});
|
||||
|
||||
called.wait(false);
|
||||
|
||||
if (result != QMessageBox::Yes)
|
||||
{
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue