mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-31 12:31:45 +01:00
Qt: also spawn exit game dialog if rpcs3 is closed (e.g. by accident)
This commit is contained in:
parent
cb5dd1353b
commit
467ef2afca
@ -1725,7 +1725,20 @@ void main_window::mouseDoubleClickEvent(QMouseEvent *event)
|
||||
*/
|
||||
void main_window::closeEvent(QCloseEvent* closeEvent)
|
||||
{
|
||||
Q_UNUSED(closeEvent);
|
||||
if (!Emu.IsStopped() && guiSettings->GetValue(gui::ib_confirm_exit).toBool())
|
||||
{
|
||||
int result;
|
||||
|
||||
guiSettings->ShowConfirmationBox(tr("Exit RPCS3?"),
|
||||
tr("A game is currently running. Do you really want to close RPCS3?\n\nAny unsaved progress will be lost!\n"),
|
||||
gui::ib_confirm_exit, &result, nullptr);
|
||||
|
||||
if (result != QMessageBox::Yes)
|
||||
{
|
||||
closeEvent->ignore();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Cleanly stop the emulator.
|
||||
Emu.Stop();
|
||||
|
Loading…
x
Reference in New Issue
Block a user