mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 08:22:32 +00:00
Qt: Disables the Pause and Stop button when no game is launched
This commit is contained in:
parent
bb6cca3056
commit
6ccd0f4d74
@ -86,6 +86,10 @@ bool MainWindow::Init() {
|
||||
CheckUpdateMain(true);
|
||||
#endif
|
||||
|
||||
// Makes the Pause and Stop buttons non-activatable (No game is launched).
|
||||
ui->pauseButton->setEnabled(false);
|
||||
ui->stopButton->setEnabled(false);
|
||||
|
||||
auto end = std::chrono::steady_clock::now();
|
||||
auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(end - start);
|
||||
statusBar.reset(new QStatusBar);
|
||||
@ -1229,6 +1233,11 @@ void MainWindow::StartEmulator(std::filesystem::path path) {
|
||||
QMessageBox::critical(nullptr, tr("Run Game"), QString(tr("Game is already running!")));
|
||||
return;
|
||||
}
|
||||
|
||||
// Makes the Pause and Stop buttons activatable (A game is launched).
|
||||
ui->pauseButton->setEnabled(true);
|
||||
ui->stopButton->setEnabled(true);
|
||||
|
||||
isGameRunning = true;
|
||||
#ifdef __APPLE__
|
||||
// SDL on macOS requires main thread.
|
||||
|
Loading…
Reference in New Issue
Block a user