Skip to content

Commit

Permalink
Починил рестарт
Browse files Browse the repository at this point in the history
  • Loading branch information
Ajeszny committed May 11, 2024
1 parent 687ff3c commit 244c8fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ int main(int argc, char *argv[])
timeStart = SDL_GetTicks();
}
}
if (event.type == SDL_KEYDOWN && event.key.keysym.sym == SDLK_r && state == gameOver) {
if (event.type == SDL_KEYUP && event.key.keysym.sym == SDLK_r && state == gameOver) {
goto exit;
}

Expand Down Expand Up @@ -412,6 +412,7 @@ int main(int argc, char *argv[])
SDL_DestroyTexture(start);
SDL_DestroyTexture(gameOverScreen);
SDL_DestroyTexture(restarScreen);
Mix_PlayMusic(pem, -1);
if (!running)
return 0;

Expand Down

0 comments on commit 244c8fc

Please sign in to comment.