diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index 939735ff4..747d64eb9 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -8,7 +8,7 @@ http://www.tuxpaint.org/ $Id$ -2021.February.15 (0.9.26) +2021.February.21 (0.9.26) * New Features ------------ * [WIP] Larger UI buttons @@ -70,6 +70,11 @@ $Id$ * Galician translation Miguel Bouzada + * Bug Fixes: + ---------- + * Halftone magic tool wasn't loading due to a problem + with its sound effect file. + 2020.December.27 (0.9.25) * New Features ------------ diff --git a/magic/sounds/halftone.ogg b/magic/sounds/halftone.ogg new file mode 100644 index 000000000..44ce07d8a Binary files /dev/null and b/magic/sounds/halftone.ogg differ diff --git a/magic/sounds/halftone.wav b/magic/sounds/halftone.wav deleted file mode 100644 index ceebf1e74..000000000 Binary files a/magic/sounds/halftone.wav and /dev/null differ diff --git a/magic/src/halftone.c b/magic/src/halftone.c index b7432a94d..bdb27cbd0 100644 --- a/magic/src/halftone.c +++ b/magic/src/halftone.c @@ -1,6 +1,6 @@ /* halftone.c - Last modified: 2011.07.17 + Last modified: 2021.02.20 */ @@ -24,7 +24,7 @@ enum const char *snd_filenames[NUM_TOOLS] = { - "halftone.wav", + "halftone.ogg", }; const char *icon_filenames[NUM_TOOLS] = { @@ -84,12 +84,14 @@ int halftone_init(magic_api * api) snprintf(fname, sizeof(fname), "%s/sounds/magic/%s", api->data_directory, snd_filenames[i]); snd_effect[i] = Mix_LoadWAV(fname); +/* if (snd_effect[i] == NULL) { SDL_FreeSurface(canvas_backup); SDL_FreeSurface(square); return (0); } +*/ } @@ -146,8 +148,11 @@ void halftone_shutdown(magic_api * api ATTRIBUTE_UNUSED) { int i; - for (i = 0; i < NUM_TOOLS; i++) - Mix_FreeChunk(snd_effect[i]); + for (i = 0; i < NUM_TOOLS; i++) { + if (snd_effect[i] != NULL) { + Mix_FreeChunk(snd_effect[i]); + } + } SDL_FreeSurface(canvas_backup); SDL_FreeSurface(square);