Stamps: Don't play English descr. when not in 'en' locale
Avoid playing English descriptive sound for a stamp stamp when not running in an English locale. Closes https://sourceforge.net/p/tuxpaint/bugs/261/
This commit is contained in:
parent
2966a8f8de
commit
9dd95721d5
2 changed files with 29 additions and 15 deletions
|
|
@ -7,11 +7,20 @@ Various contributors (see below, and AUTHORS.txt)
|
||||||
https://tuxpaint.org/
|
https://tuxpaint.org/
|
||||||
|
|
||||||
2023.April.9 (0.9.30)
|
2023.April.9 (0.9.30)
|
||||||
|
* Improvements to Stamp tool:
|
||||||
|
---------------------------
|
||||||
|
* Avoid playing English descriptive sound for a stamp
|
||||||
|
stamp when not running in an English locale.
|
||||||
|
Closes https://sourceforge.net/p/tuxpaint/bugs/261/
|
||||||
|
Bill Kendrick <bill@newbreedsoftware.com>
|
||||||
|
|
||||||
* Improvements to Shape tool:
|
* Improvements to Shape tool:
|
||||||
---------------------------
|
---------------------------
|
||||||
* Octagon allows aspect ratio change
|
* Octagon allows aspect ratio change
|
||||||
|
Bill Kendrick <bill@newbreedsoftware.com>
|
||||||
|
|
||||||
* Slight improvement to shape calculations
|
* Slight improvement to shape calculations
|
||||||
|
Bill Kendrick <bill@newbreedsoftware.com>
|
||||||
|
|
||||||
* Localization Updates:
|
* Localization Updates:
|
||||||
---------------------
|
---------------------
|
||||||
|
|
|
||||||
|
|
@ -13702,24 +13702,29 @@ static Mix_Chunk *loadsound_extra(const char *const fname, const char *extra)
|
||||||
|
|
||||||
debug("...No short local version of sound (WAV)!");
|
debug("...No short local version of sound (WAV)!");
|
||||||
|
|
||||||
strcpy(snd_fname, fname); /* malloc'd size should be sufficient */
|
if (strcmp(extra, "_desc") != 0 || strcmp(short_lang_prefix, "en") == 0) {
|
||||||
safe_snprintf(tmp_str, sizeof(tmp_str), "%s.ogg", extra);
|
/* (Not loading a descriptive sound, or we're in English locale, go ahead and fall back;
|
||||||
strcpy((char *) strcasestr(snd_fname, ext), tmp_str); /* FIXME: Use strncpy() (ugh, complicated) */
|
i.e., if loading a descriptive sound in a non-English locale, let's not load the
|
||||||
debug(snd_fname);
|
English version; see https://sourceforge.net/p/tuxpaint/bugs/261/) */
|
||||||
tmp_snd = Mix_LoadWAV(snd_fname);
|
strcpy(snd_fname, fname); /* malloc'd size should be sufficient */
|
||||||
|
safe_snprintf(tmp_str, sizeof(tmp_str), "%s.ogg", extra);
|
||||||
if (tmp_snd == NULL)
|
strcpy((char *) strcasestr(snd_fname, ext), tmp_str); /* FIXME: Use strncpy() (ugh, complicated) */
|
||||||
{
|
|
||||||
debug("...No default version of sound (OGG)!");
|
|
||||||
|
|
||||||
strcpy(snd_fname, fname); /* malloc'd size should be sufficient */
|
|
||||||
safe_snprintf(tmp_str, sizeof(tmp_str), "%s.wav", extra);
|
|
||||||
strcpy((char *) strcasestr(snd_fname, ext), tmp_str); /* FIXME: Use strncpy() (ugh, complicated) */
|
|
||||||
debug(snd_fname);
|
debug(snd_fname);
|
||||||
tmp_snd = Mix_LoadWAV(snd_fname);
|
tmp_snd = Mix_LoadWAV(snd_fname);
|
||||||
|
|
||||||
if (tmp_snd == NULL)
|
if (tmp_snd == NULL)
|
||||||
debug("...No default version of sound (WAV)!");
|
{
|
||||||
|
debug("...No default version of sound (OGG)!");
|
||||||
|
|
||||||
|
strcpy(snd_fname, fname); /* malloc'd size should be sufficient */
|
||||||
|
safe_snprintf(tmp_str, sizeof(tmp_str), "%s.wav", extra);
|
||||||
|
strcpy((char *) strcasestr(snd_fname, ext), tmp_str); /* FIXME: Use strncpy() (ugh, complicated) */
|
||||||
|
debug(snd_fname);
|
||||||
|
tmp_snd = Mix_LoadWAV(snd_fname);
|
||||||
|
|
||||||
|
if (tmp_snd == NULL)
|
||||||
|
debug("...No default version of sound (WAV)!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue