mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
Play Custom functions with no file selected slowed down the radio
This commit is contained in:
parent
c3e0d1967b
commit
0c9b45e738
1 changed files with 8 additions and 6 deletions
|
@ -3353,6 +3353,7 @@ uint8_t fnSwitchDuration[NUM_CFN] = { 0 };
|
|||
|
||||
inline void playCustomFunctionFile(CustomFnData *sd, uint8_t id)
|
||||
{
|
||||
if (sd->play.name[0] != '\0') {
|
||||
char filename[sizeof(SOUNDS_PATH)+sizeof(sd->play.name)+sizeof(SOUNDS_EXT)] = SOUNDS_PATH "/";
|
||||
strncpy(filename+SOUNDS_PATH_LNG_OFS, currentLanguagePack->id, 2);
|
||||
strncpy(filename+sizeof(SOUNDS_PATH), sd->play.name, sizeof(sd->play.name));
|
||||
|
@ -3360,6 +3361,7 @@ inline void playCustomFunctionFile(CustomFnData *sd, uint8_t id)
|
|||
strcat(filename+sizeof(SOUNDS_PATH), SOUNDS_EXT);
|
||||
PLAY_FILE(filename, sd->func==FUNC_BACKGND_MUSIC ? PLAY_BACKGROUND : 0, id);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue