mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 18:05:46 +00:00
Merge pull request #8592 from devsnek/sig-handlers
exit gracefully on sigint/sigterm
This commit is contained in:
parent
1779795d81
commit
9479940a1f
2 changed files with 71 additions and 0 deletions
|
@ -163,6 +163,8 @@ signals:
|
|||
void WebBrowserExtractOfflineRomFS();
|
||||
void WebBrowserClosed(Service::AM::Applets::WebExitReason exit_reason, std::string last_url);
|
||||
|
||||
void SigInterrupt();
|
||||
|
||||
public slots:
|
||||
void OnLoadComplete();
|
||||
void OnExecuteProgram(std::size_t program_index);
|
||||
|
@ -251,6 +253,12 @@ private:
|
|||
void RequestGameResume();
|
||||
void closeEvent(QCloseEvent* event) override;
|
||||
|
||||
#ifdef __linux__
|
||||
void SetupSigInterrupts();
|
||||
static void HandleSigInterrupt(int);
|
||||
void OnSigInterruptNotifierActivated();
|
||||
#endif
|
||||
|
||||
private slots:
|
||||
void OnStartGame();
|
||||
void OnRestartGame();
|
||||
|
@ -419,6 +427,9 @@ private:
|
|||
bool is_tas_recording_dialog_active{};
|
||||
|
||||
#ifdef __linux__
|
||||
QSocketNotifier* sig_interrupt_notifier;
|
||||
static std::array<int, 3> sig_interrupt_fds;
|
||||
|
||||
QDBusObjectPath wake_lock{};
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue