summaryrefslogtreecommitdiff
path: root/apps/plugins/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r--apps/plugins/lib/mem_function_wrappers.h44
-rw-r--r--apps/plugins/lib/playback_control.c10
2 files changed, 50 insertions, 4 deletions
diff --git a/apps/plugins/lib/mem_function_wrappers.h b/apps/plugins/lib/mem_function_wrappers.h
new file mode 100644
index 0000000000..ec3872c4c1
--- /dev/null
+++ b/apps/plugins/lib/mem_function_wrappers.h
@@ -0,0 +1,44 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 Nils Wallménius
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#ifndef __MEM_FUNCTION_WRAPPERS_H__
20#define __MEM_FUNCTION_WRAPPERS_H__
21
22/* Use this macro in plugins where gcc tries to optimize by calling
23 * these functions directly */
24
25#define MEM_FUNCTION_WRAPPERS(api) \
26 void *memcpy(void *dest, const void *src, size_t n) \
27 { \
28 return (api)->memcpy(dest, src, n); \
29 } \
30 void *memset(void *dest, int c, size_t n) \
31 { \
32 return (api)->memset(dest, c, n); \
33 } \
34 void *memmove(void *dest, const void *src, size_t n) \
35 { \
36 return (api)->memmove(dest, src, n); \
37 } \
38 int memcmp(const void *s1, const void *s2, size_t n) \
39 { \
40 return (api)->memcmp(s1, s2, n); \
41 }
42
43#endif /* __MEM_FUNCTION_WRAPPERS_H__ */
44
diff --git a/apps/plugins/lib/playback_control.c b/apps/plugins/lib/playback_control.c
index 34401e1d4f..177f26a417 100644
--- a/apps/plugins/lib/playback_control.c
+++ b/apps/plugins/lib/playback_control.c
@@ -65,10 +65,12 @@ static bool volume(void)
65 65
66static bool shuffle(void) 66static bool shuffle(void)
67{ 67{
68 struct opt_items names[] = { 68 struct opt_items names[2];
69 { "No", -1 }, 69 names[0].string = "No";
70 { "Yes", -1 } 70 names[0].voice_id = -1;
71 }; 71 names[1].string = "Yes";
72 names[1].voice_id = -1;
73
72 return api->set_option("Shuffle", &api->global_settings->playlist_shuffle, 74 return api->set_option("Shuffle", &api->global_settings->playlist_shuffle,
73 BOOL, names, 2,NULL); 75 BOOL, names, 2,NULL);
74} 76}