From c2b210f713cc820acc08a032d043c22287956bed Mon Sep 17 00:00:00 2001 From: LittleWhite Date: Sun, 10 Jan 2016 13:31:20 +0100 Subject: Add check before closure when emulation is running Implement confirmation in a specific function Fix typos and coding style Coding convention --- src/citra_qt/main.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/citra_qt/main.h') diff --git a/src/citra_qt/main.h b/src/citra_qt/main.h index f6d429cd9..3b1bdf15e 100644 --- a/src/citra_qt/main.h +++ b/src/citra_qt/main.h @@ -82,6 +82,13 @@ private: */ void UpdateRecentFiles(); + /** + * If the emulation is running, + * asks the user if he really want to close the emulator + * + * @return true if the user confirmed + */ + bool ConfirmClose(); void closeEvent(QCloseEvent* event) override; private slots: -- cgit v1.2.3 From 973a6c40dae76b4a03af3e481a31cedfb3011115 Mon Sep 17 00:00:00 2001 From: LittleWhite Date: Wed, 13 Jan 2016 18:40:41 +0100 Subject: Add a configuration entry to enable/disable the check --- src/citra_qt/main.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/citra_qt/main.h') diff --git a/src/citra_qt/main.h b/src/citra_qt/main.h index 3b1bdf15e..8c195f816 100644 --- a/src/citra_qt/main.h +++ b/src/citra_qt/main.h @@ -129,6 +129,7 @@ private: GPUCommandListWidget* graphicsCommandsWidget; QAction* actions_recent_files[max_recent_files_item]; + bool confirm_before_closing; }; #endif // _CITRA_QT_MAIN_HXX_ -- cgit v1.2.3