GraphicPacksWindow: Disable update button when a game is running (#1137)

This commit is contained in:
goeiecool9999 2024-03-26 13:09:24 +01:00 committed by GitHub
parent 111e383d1b
commit 4f3d4624f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 30 additions and 11 deletions

View file

@ -625,6 +625,7 @@ bool MainWindow::FileLoad(const fs::path launchPath, wxLaunchGameEvent::INITIATE
CreateCanvas();
CafeSystem::LaunchForegroundTitle();
RecreateMenu();
UpdateChildWindowTitleRunningState();
return true;
}
@ -683,6 +684,7 @@ void MainWindow::OnFileMenu(wxCommandEvent& event)
RecreateMenu();
CreateGameListAndStatusBar();
DoLayout();
UpdateChildWindowTitleRunningState();
}
}
@ -2320,6 +2322,14 @@ void MainWindow::RecreateMenu()
SetMenuVisible(false);
}
void MainWindow::UpdateChildWindowTitleRunningState()
{
const bool running = CafeSystem::IsTitleRunning();
if(m_graphic_pack_window)
m_graphic_pack_window->UpdateTitleRunning(running);
}
void MainWindow::RestoreSettingsAfterGameExited()
{
RecreateMenu();