Skip to content

Commit

Permalink
Fix fullscreen toggle and ghost weapon
Browse files Browse the repository at this point in the history
Addresses the two remaining issues from issue simenheg#3
  • Loading branch information
stianval committed Nov 19, 2024
1 parent 1983965 commit e3be83a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ bool screenFreeze = false;
*/
int initScreen(void)
{
if (window) {
SDL_DestroyWindow(window);
}

window = SDL_CreateWindow("Zatacka X",
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
WINDOW_W, WINDOW_H,
Expand Down
2 changes: 2 additions & 0 deletions src/zatackax.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,8 @@ void addToHitMap(unsigned int x, unsigned int y, unsigned char player,
player, killer);
SDL_UnlockSurface(gameScreen);
killPlayer(player, killer);
} else {
SDL_UnlockSurface(gameScreen);
}
if (olvl >= O_DEBUG)
fprintf(stderr, "Player %d crashed at: (%d, %d)\n",
Expand Down

0 comments on commit e3be83a

Please sign in to comment.