Qt: Fix a few places per-game settings were not checked

This commit is contained in:
Stenzek
2024-07-15 16:31:40 +10:00
parent 5381ad9cd1
commit 00cc3b65fc
4 changed files with 13 additions and 15 deletions

View File

@ -138,21 +138,21 @@ void DisplayWidget::updateCursor(bool hidden)
void DisplayWidget::handleCloseEvent(QCloseEvent* event)
{
event->ignore();
// Closing the separate widget will either cancel the close, or trigger shutdown.
// In the latter case, it's going to destroy us, so don't let Qt do it first.
// Treat a close event while fullscreen as an exit, that way ALT+F4 closes DuckStation,
// rather than just the game.
if (QtHost::IsSystemValid() && !isActuallyFullscreen())
{
QMetaObject::invokeMethod(g_main_window, "requestShutdown", Q_ARG(bool, true), Q_ARG(bool, true),
Q_ARG(bool, false));
QMetaObject::invokeMethod(g_main_window, "requestShutdown", Qt::QueuedConnection, Q_ARG(bool, true),
Q_ARG(bool, true), Q_ARG(bool, false));
}
else
{
QMetaObject::invokeMethod(g_main_window, "requestExit");
QMetaObject::invokeMethod(g_main_window, "requestExit", Qt::QueuedConnection);
}
event->ignore();
}
void DisplayWidget::destroy()