summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer/mpeg_settings.c
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2021-08-18 01:23:26 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2021-08-19 01:17:29 +0000
commit24e8fa317e9905ee30d195c4beedd7b8939ed6e1 (patch)
treeb1dbca81e43d045c2df6fa9848e3a5bb4e9d91e8 /apps/plugins/mpegplayer/mpeg_settings.c
parent4cbb5b42010309677f3590e3a716c69c12e8adf2 (diff)
downloadrockbox-24e8fa317e9905ee30d195c4beedd7b8939ed6e1.tar.gz
rockbox-24e8fa317e9905ee30d195c4beedd7b8939ed6e1.zip
plugins trade talk_value for talk_value_decimal
talk_value is just talk_value_decimal with 0 decimals lets add the extended function instead static inline int talk_val(long n, int unit, bool enqueue) { #define NODECIMALS 0 return rb->talk_value_decimal(n, unit, NODECIMALS, enqueue); } Change-Id: Iaba3d2f95785f2e1855e294ccf099a977bb6cb20
Diffstat (limited to 'apps/plugins/mpegplayer/mpeg_settings.c')
-rw-r--r--apps/plugins/mpegplayer/mpeg_settings.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c
index b1445781d0..4c9fc16804 100644
--- a/apps/plugins/mpegplayer/mpeg_settings.c
+++ b/apps/plugins/mpegplayer/mpeg_settings.c
@@ -470,6 +470,12 @@ static bool mpeg_set_int(const char *string, const char *unit,
470 return usb; 470 return usb;
471} 471}
472 472
473static inline int talk_val(long n, int unit, bool enqueue)
474{
475 #define NODECIMALS 0
476 return rb->talk_value_decimal(n, unit, NODECIMALS, enqueue);
477}
478
473static int32_t backlight_brightness_getlang(int value, int unit) 479static int32_t backlight_brightness_getlang(int value, int unit)
474{ 480{
475 if (value < 0) 481 if (value < 0)
@@ -988,8 +994,8 @@ static int get_start_time(uint32_t duration)
988 mpegplayer_iram_preserve(); 994 mpegplayer_iram_preserve();
989#endif 995#endif
990 rb->talk_disable(false); 996 rb->talk_disable(false);
991 rb->talk_value(resume_time / TS_SECOND, UNIT_TIME, false); 997 talk_val(resume_time / TS_SECOND, UNIT_TIME, false);
992 rb->talk_value(resume_time * 100 / duration, UNIT_PERCENT, true); 998 talk_val(resume_time * 100 / duration, UNIT_PERCENT, true);
993 } 999 }
994 sliding = false; 1000 sliding = false;
995 } 1001 }