summaryrefslogtreecommitdiffstats
path: root/apps/gui/skin_engine/skin_tokens.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/skin_engine/skin_tokens.c')
-rw-r--r--apps/gui/skin_engine/skin_tokens.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c
index e0d4595122..ad4613ed99 100644
--- a/apps/gui/skin_engine/skin_tokens.c
+++ b/apps/gui/skin_engine/skin_tokens.c
@@ -717,9 +717,10 @@ const char *get_token_value(struct gui_wps *gwps,
#if (CONFIG_CODEC != MAS3507D)
case WPS_TOKEN_SOUND_PITCH:
{
- int val = sound_get_pitch();
- snprintf(buf, buf_size, "%d.%d",
- val / 10, val % 10);
+ int32_t pitch = sound_get_pitch();
+ snprintf(buf, buf_size, "%ld.%ld",
+ pitch / PITCH_SPEED_PRECISION,
+ (pitch % PITCH_SPEED_PRECISION) / (PITCH_SPEED_PRECISION / 10));
return buf;
}
#endif