Skip to content

Commit e535b6a

Browse files
committed
Add SDL_Quit and improve comment
1 parent 4737ff0 commit e535b6a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

_includes/samples/sdl2/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ int main(int argc, char *argv[])
2424
if (SDL_PollEvent(&event)) {
2525
switch (event.type) {
2626
case SDL_QUIT:
27-
// If the close button is pressed on pc, close the program
27+
// End the loop if the programs is being closed
2828
running = 0;
2929
break;
3030
case SDL_CONTROLLERDEVICEADDED:
@@ -51,6 +51,7 @@ int main(int argc, char *argv[])
5151
SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
5252
SDL_RenderPresent(renderer);
5353
}
54+
SDL_Quit();
5455

5556
return 0;
5657
}

0 commit comments

Comments
 (0)