Skip to content

Commit

Permalink
Play next song even while paused
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkwouter committed Oct 8, 2024
1 parent dde5e7c commit 494f1ff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/states/GameState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ void GameState::update() {
this->failed = true;
}

if (!this->paused && !this->completed && !this->failed) {
if (!this->completed && !this->failed) {
this->theme.update();
this->board->update();
if(!this->paused) {
this->board->update();
}
}
}

Expand Down
6 changes: 4 additions & 2 deletions src/states/GameStateChallenge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ void GameStateChallenge::update() {
this->failed = true;
}

if (!this->paused && !this->completed && !this->failed) {
if (!this->completed && !this->failed) {
this->theme.update();
this->board->update();
if(!this->paused) {
this->board->update();
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/states/GameStateRelaxed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ GameStateRelaxed::~GameStateRelaxed() {
}

void GameStateRelaxed::update() {
this->theme.update();
if (!this->paused) {
this->theme.update();
this->board->update();
}
}
Expand Down

0 comments on commit 494f1ff

Please sign in to comment.