[Taranis/sky9x] SD sounds directory /SOUNDS/en/SYSTEM instead of /SOUNDS/SYSTEM/en

This commit is contained in:
bsongis@gmail.com
2013-05-11 05:45:13 +00:00
parent 47881b80da
commit 4dfa4d7249
4 changed files with 27 additions and 23 deletions
+5 -5
View File
@@ -2422,11 +2422,11 @@ uint8_t fnSwitchDuration[NUM_CFN] = { 0 };
inline void playCustomFunctionFile(CustomFnData *sd, uint8_t id)
{
char filename[] = SOUNDS_PATH "/en/xxxxxx.wav";
strncpy(filename+sizeof(SOUNDS_PATH), currentLanguagePack->id, 2);
strncpy(filename+sizeof(SOUNDS_PATH)+3, sd->param.name, sizeof(sd->param.name));
filename[sizeof(SOUNDS_PATH)+3+sizeof(sd->param.name)] = '\0';
strcat(filename+sizeof(SOUNDS_PATH)+3, SOUNDS_EXT);
char filename[] = SOUNDS_PATH "/xxxxxx.wav";
strncpy(filename+SOUNDS_PATH_LNG_OFS, currentLanguagePack->id, 2);
strncpy(filename+sizeof(SOUNDS_PATH), sd->param.name, sizeof(sd->param.name));
filename[sizeof(SOUNDS_PATH)+sizeof(sd->param.name)] = '\0';
strcat(filename+sizeof(SOUNDS_PATH), SOUNDS_EXT);
PLAY_FILE(filename, sd->func==FUNC_BACKGND_MUSIC ? PLAY_BACKGROUND : 0, id);
}
#endif