mirror of
https://github.com/stenzek/duckstation.git
synced 2025-07-23 10:30:23 +00:00
Qt: Don't enable window size menu if system isn't running (#3484)
This commit is contained in:
parent
24a16db437
commit
4c12dc8ab9
@ -423,7 +423,7 @@ void MainWindow::createDisplayWidget(bool fullscreen, bool render_to_main)
|
|||||||
|
|
||||||
void MainWindow::exitFullscreen(bool wait_for_completion)
|
void MainWindow::exitFullscreen(bool wait_for_completion)
|
||||||
{
|
{
|
||||||
if (!m_display_widget || !isRenderingFullscreen())
|
if (!isRenderingFullscreen())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_emu_thread->setFullscreen(false);
|
g_emu_thread->setFullscreen(false);
|
||||||
@ -518,7 +518,7 @@ void MainWindow::updateDisplayRelatedActions(bool has_surface, bool fullscreen)
|
|||||||
{
|
{
|
||||||
// rendering to main, or switched to gamelist/grid
|
// rendering to main, or switched to gamelist/grid
|
||||||
m_ui.actionViewSystemDisplay->setEnabled(wantsDisplayWidget() && QtHost::CanRenderToMainWindow());
|
m_ui.actionViewSystemDisplay->setEnabled(wantsDisplayWidget() && QtHost::CanRenderToMainWindow());
|
||||||
m_ui.menuWindowSize->setEnabled(has_surface && !fullscreen);
|
m_ui.menuWindowSize->setEnabled(s_system_valid && has_surface && !fullscreen);
|
||||||
m_ui.actionFullscreen->setEnabled(has_surface);
|
m_ui.actionFullscreen->setEnabled(has_surface);
|
||||||
m_ui.actionFullscreen->setChecked(fullscreen);
|
m_ui.actionFullscreen->setChecked(fullscreen);
|
||||||
}
|
}
|
||||||
@ -540,8 +540,7 @@ void MainWindow::onMouseModeRequested(bool relative_mode, bool hide_cursor)
|
|||||||
{
|
{
|
||||||
m_relative_mouse_mode = relative_mode;
|
m_relative_mouse_mode = relative_mode;
|
||||||
m_hide_mouse_cursor = hide_cursor;
|
m_hide_mouse_cursor = hide_cursor;
|
||||||
if (m_display_widget)
|
updateDisplayWidgetCursor();
|
||||||
updateDisplayWidgetCursor();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onSystemStarting()
|
void MainWindow::onSystemStarting()
|
||||||
@ -577,8 +576,7 @@ void MainWindow::onSystemPaused()
|
|||||||
s_system_paused = true;
|
s_system_paused = true;
|
||||||
updateStatusBarWidgetVisibility();
|
updateStatusBarWidgetVisibility();
|
||||||
m_ui.statusBar->showMessage(tr("Paused"));
|
m_ui.statusBar->showMessage(tr("Paused"));
|
||||||
if (m_display_widget)
|
updateDisplayWidgetCursor();
|
||||||
updateDisplayWidgetCursor();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onSystemResumed()
|
void MainWindow::onSystemResumed()
|
||||||
@ -593,11 +591,9 @@ void MainWindow::onSystemResumed()
|
|||||||
m_was_disc_change_request = false;
|
m_was_disc_change_request = false;
|
||||||
m_ui.statusBar->clearMessage();
|
m_ui.statusBar->clearMessage();
|
||||||
updateStatusBarWidgetVisibility();
|
updateStatusBarWidgetVisibility();
|
||||||
|
updateDisplayWidgetCursor();
|
||||||
if (m_display_widget)
|
if (m_display_widget)
|
||||||
{
|
|
||||||
updateDisplayWidgetCursor();
|
|
||||||
m_display_widget->setFocus();
|
m_display_widget->setFocus();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onSystemStopping()
|
void MainWindow::onSystemStopping()
|
||||||
@ -2159,10 +2155,7 @@ bool MainWindow::isShowingGameList() const
|
|||||||
|
|
||||||
bool MainWindow::isRenderingFullscreen() const
|
bool MainWindow::isRenderingFullscreen() const
|
||||||
{
|
{
|
||||||
if (!m_display_widget)
|
return m_display_widget && (m_exclusive_fullscreen_requested || getDisplayContainer()->isFullScreen());
|
||||||
return false;
|
|
||||||
|
|
||||||
return (m_exclusive_fullscreen_requested || getDisplayContainer()->isFullScreen());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MainWindow::isRenderingToMain() const
|
bool MainWindow::isRenderingToMain() const
|
||||||
@ -3059,7 +3052,7 @@ void MainWindow::onToolsCoverDownloaderTriggered()
|
|||||||
|
|
||||||
void MainWindow::onToolsMediaCaptureToggled(bool checked)
|
void MainWindow::onToolsMediaCaptureToggled(bool checked)
|
||||||
{
|
{
|
||||||
if (!QtHost::IsSystemValid())
|
if (!s_system_valid)
|
||||||
{
|
{
|
||||||
// leave it for later, we'll fill in the boot params
|
// leave it for later, we'll fill in the boot params
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user