mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +12:00
Qt: also spawn exit game dialog if rpcs3 is closed (e.g. by accident)
This commit is contained in:
parent
cb5dd1353b
commit
467ef2afca
1 changed files with 14 additions and 1 deletions
|
@ -1725,7 +1725,20 @@ void main_window::mouseDoubleClickEvent(QMouseEvent *event)
|
||||||
*/
|
*/
|
||||||
void main_window::closeEvent(QCloseEvent* closeEvent)
|
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.
|
// Cleanly stop the emulator.
|
||||||
Emu.Stop();
|
Emu.Stop();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue