mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-25 15:15:40 +00:00
Qt: Fix a few places per-game settings were not checked
This commit is contained in:
parent
5381ad9cd1
commit
00cc3b65fc
|
@ -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()
|
||||
|
|
|
@ -31,8 +31,8 @@ LogWindow::~LogWindow() = default;
|
|||
|
||||
void LogWindow::updateSettings()
|
||||
{
|
||||
const bool new_enabled = Host::GetBaseBoolSettingValue("Logging", "LogToWindow", false);
|
||||
const bool attach_to_main = Host::GetBaseBoolSettingValue("Logging", "AttachLogWindowToMainWindow", true);
|
||||
const bool new_enabled = Host::GetBoolSettingValue("Logging", "LogToWindow", false);
|
||||
const bool attach_to_main = Host::GetBoolSettingValue("Logging", "AttachLogWindowToMainWindow", true);
|
||||
const bool curr_enabled = (g_log_window != nullptr);
|
||||
if (new_enabled == curr_enabled)
|
||||
{
|
||||
|
|
|
@ -1980,7 +1980,7 @@ bool MainWindow::shouldHideMouseCursor() const
|
|||
|
||||
bool MainWindow::shouldHideMainWindow() const
|
||||
{
|
||||
return Host::GetBaseBoolSettingValue("Main", "HideMainWindowWhenRunning", false) ||
|
||||
return Host::GetBoolSettingValue("Main", "HideMainWindowWhenRunning", false) ||
|
||||
(g_emu_thread->shouldRenderToMain() && !isRenderingToMain()) || QtHost::InNoGUIMode();
|
||||
}
|
||||
|
||||
|
@ -2872,7 +2872,7 @@ bool MainWindow::requestShutdown(bool allow_confirm /* = true */, bool allow_sav
|
|||
save_state &= allow_save_to_state;
|
||||
|
||||
// Only confirm on UI thread because we need to display a msgbox.
|
||||
if (!m_is_closing && allow_confirm && Host::GetBaseBoolSettingValue("Main", "ConfirmPowerOff", true))
|
||||
if (!m_is_closing && allow_confirm && Host::GetBoolSettingValue("Main", "ConfirmPowerOff", true))
|
||||
{
|
||||
SystemLock lock(pauseAndLockSystem());
|
||||
|
||||
|
|
|
@ -632,14 +632,12 @@ void EmuThread::checkForSettingsChanges(const Settings& old_settings)
|
|||
updatePerformanceCounters();
|
||||
}
|
||||
|
||||
if (g_gpu_device)
|
||||
const bool render_to_main = shouldRenderToMain();
|
||||
if (m_is_rendering_to_main != render_to_main)
|
||||
{
|
||||
const bool render_to_main = shouldRenderToMain();
|
||||
if (m_is_rendering_to_main != render_to_main)
|
||||
{
|
||||
m_is_rendering_to_main = render_to_main;
|
||||
m_is_rendering_to_main = render_to_main;
|
||||
if (g_gpu_device)
|
||||
g_gpu_device->UpdateWindow();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue