Small changes

This commit is contained in:
Franck STAUFFER 2020-08-03 19:12:43 +02:00
parent a7af00d1b1
commit 1ecb8a7a8a
Signed by: franck.stauffer
GPG Key ID: AAF5A94045CEC261

View File

@ -123,6 +123,9 @@ init_SDL(const char* path)
return 0;
}
fg = SDL_MapRGB(s->format, 255, 255, 255);
bg = SDL_MapRGB(s->format, 0, 0, 0);
buzzer = Mix_LoadWAV("resources/buzzer.wav");
if (!buzzer) {
fputs("ERROR: Failed to load sound effects\n", stderr);
@ -584,9 +587,6 @@ main(int argc, char** argv)
if (!init_SDL(argv[1]))
return 1;
fg = SDL_MapRGB(s->format, 255, 255, 255);
bg = SDL_MapRGB(s->format, 0, 0, 0);
struct sigaction sa;
memset(&sa, 0, sizeof(struct sigaction));
sa.sa_handler = timers;
@ -604,7 +604,7 @@ loop:
event_handler();
if (!op_handler())
exit(1);
return 1;
usleep(WAIT);