Added atexit(SDL_Quit) for bail out without crash.
[AROS-Ports.git] / game / madbomber / madbomber-0.2.5-aros.diff
blobf71b91888e2d8ed16adcb03a1b3b65804b789e4e
1 diff -Naur madbomber-0.2.5-orig/madbomber.c madbomber-0.2.5/madbomber.c
2 --- madbomber-0.2.5-orig/madbomber.c 2016-12-28 09:56:03.551794326 +0100
3 +++ madbomber-0.2.5/madbomber.c 2016-12-28 09:42:27.420813567 +0100
4 @@ -2678,7 +2678,8 @@
5 exit(1);
8 -
9 + atexit(SDL_Quit);
11 /* Init SDL Audio: */
13 if (use_sound == 1)
14 @@ -2998,7 +2999,7 @@
15 "%s\n"
16 "The Simple DirectMedia error that occured was:\n"
17 "%s\n\n", MUS_TITLE, SDL_GetError());
18 - exit(1);
19 + // exit(1);
23 @@ -3011,7 +3012,7 @@
24 "%s\n"
25 "The Simple DirectMedia error that occured was:\n"
26 "%s\n\n", MUS_TITLE, SDL_GetError());
27 - exit(1);
28 + // exit(1);
30 #endif
32 @@ -3026,7 +3027,7 @@
33 "%s\n"
34 "The Simple DirectMedia error that occured was:\n"
35 "%s\n\n", game_music_names[i], SDL_GetError());
36 - exit(1);
37 + // exit(1);
41 @@ -4150,8 +4151,9 @@
42 char * filename, * home;
43 FILE * fi;
46 -#ifndef WIN32
47 +#if defined(__AROS__)
48 + filename = "PROGDIR:.madbomber";
49 +#elif !defined(WIN32)
50 /* Get home directory (from $HOME variable)... if we can't determine it,
51 use the current directory ("."): */