1
0
mirror of https://git.suyu.dev/suyu/suyu synced 2025-09-07 06:46:31 -05:00

qt: continue event loop during game close

This commit is contained in:
Liam
2022-12-18 23:09:44 -05:00
parent 1b11e0f0d3
commit 053ad04d3f
4 changed files with 64 additions and 14 deletions

View File

@@ -259,3 +259,9 @@ void OverlayDialog::InputThread() {
std::this_thread::sleep_for(std::chrono::milliseconds(50));
}
}
void OverlayDialog::keyPressEvent(QKeyEvent* e) {
if (!ui->buttonsDialog->isHidden() || e->key() != Qt::Key_Escape) {
QDialog::keyPressEvent(e);
}
}

View File

@@ -94,6 +94,7 @@ private:
/// The thread where input is being polled and processed.
void InputThread();
void keyPressEvent(QKeyEvent* e) override;
std::unique_ptr<Ui::OverlayDialog> ui;