diff options
author | Franklin Wei <git@fwei.tk> | 2017-05-17 17:42:30 -0400 |
---|---|---|
committer | Franklin Wei <git@fwei.tk> | 2017-05-17 17:42:30 -0400 |
commit | 7b6f34a4561c544739c4271ecc27c1d5a7b0af7d (patch) | |
tree | 1311ec7e486316e2207e0fb423743a1116f6dbed /apps | |
parent | 001860ce7856e20b890d8adf425c899540a5d5d3 (diff) | |
download | rockbox-7b6f34a4561c544739c4271ecc27c1d5a7b0af7d.tar.gz rockbox-7b6f34a4561c544739c4271ecc27c1d5a7b0af7d.zip |
puzzles: fix building
- disables help on c200v2
- renames conflicting function
Change-Id: I0c4ff1bb40e7e3cafd0170090f22b80bf0656741
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/puzzles/SOURCES | 3 | ||||
-rw-r--r-- | apps/plugins/puzzles/rockbox.c | 17 | ||||
-rw-r--r-- | apps/plugins/puzzles/src/misc.c | 4 |
3 files changed, 22 insertions, 2 deletions
diff --git a/apps/plugins/puzzles/SOURCES b/apps/plugins/puzzles/SOURCES index 1e3264ec37..af43fd5616 100644 --- a/apps/plugins/puzzles/SOURCES +++ b/apps/plugins/puzzles/SOURCES | |||
@@ -1,8 +1,11 @@ | |||
1 | rockbox.c | 1 | rockbox.c |
2 | rbwrappers.c | 2 | rbwrappers.c |
3 | rbmalloc.c | 3 | rbmalloc.c |
4 | |||
5 | #ifndef SANSA_C200V2 | ||
4 | help.c | 6 | help.c |
5 | helpcontent.c | 7 | helpcontent.c |
8 | #endif | ||
6 | 9 | ||
7 | src/combi.c | 10 | src/combi.c |
8 | src/divvy.c | 11 | src/divvy.c |
diff --git a/apps/plugins/puzzles/rockbox.c b/apps/plugins/puzzles/rockbox.c index 7a784ba97c..7a29f341f0 100644 --- a/apps/plugins/puzzles/rockbox.c +++ b/apps/plugins/puzzles/rockbox.c | |||
@@ -1099,6 +1099,15 @@ static void quick_help(void) | |||
1099 | } | 1099 | } |
1100 | } | 1100 | } |
1101 | 1101 | ||
1102 | #ifdef SANSA_C200V2 | ||
1103 | /* no full help available due to memory constraints, so we provide a | ||
1104 | * dummy function here */ | ||
1105 | void full_help(const char *str) | ||
1106 | { | ||
1107 | (void) str; | ||
1108 | } | ||
1109 | #endif | ||
1110 | |||
1102 | static void init_default_settings(void) | 1111 | static void init_default_settings(void) |
1103 | { | 1112 | { |
1104 | settings.slowmo_factor = 1; | 1113 | settings.slowmo_factor = 1; |
@@ -1214,7 +1223,11 @@ static int pausemenu_cb(int action, const struct menu_item_ex *this_item) | |||
1214 | return ACTION_EXIT_MENUITEM; | 1223 | return ACTION_EXIT_MENUITEM; |
1215 | break; | 1224 | break; |
1216 | case 7: | 1225 | case 7: |
1226 | #ifdef SANSA_C200V2 | ||
1227 | return ACTION_EXIT_MENUITEM; | ||
1228 | #else | ||
1217 | break; | 1229 | break; |
1230 | #endif | ||
1218 | case 8: | 1231 | case 8: |
1219 | #ifdef COMBINED | 1232 | #ifdef COMBINED |
1220 | /* audio buf is used, so no playback */ | 1233 | /* audio buf is used, so no playback */ |
@@ -1806,7 +1819,11 @@ static int mainmenu_cb(int action, const struct menu_item_ex *this_item) | |||
1806 | return ACTION_EXIT_MENUITEM; | 1819 | return ACTION_EXIT_MENUITEM; |
1807 | break; | 1820 | break; |
1808 | case 3: | 1821 | case 3: |
1822 | #ifdef SANSA_C200V2 | ||
1823 | return ACTION_EXIT_MENUITEM; | ||
1824 | #else | ||
1809 | break; | 1825 | break; |
1826 | #endif | ||
1810 | case 4: | 1827 | case 4: |
1811 | #ifdef COMBINED | 1828 | #ifdef COMBINED |
1812 | /* audio buf is used, so no playback */ | 1829 | /* audio buf is used, so no playback */ |
diff --git a/apps/plugins/puzzles/src/misc.c b/apps/plugins/puzzles/src/misc.c index c721016563..9904aee75e 100644 --- a/apps/plugins/puzzles/src/misc.c +++ b/apps/plugins/puzzles/src/misc.c | |||
@@ -201,7 +201,7 @@ void game_mkhighlight(frontend *fe, float *ret, | |||
201 | game_mkhighlight_specific(fe, ret, background, highlight, lowlight); | 201 | game_mkhighlight_specific(fe, ret, background, highlight, lowlight); |
202 | } | 202 | } |
203 | 203 | ||
204 | static void memswap(void *av, void *bv, int size) | 204 | static void swap_regions(void *av, void *bv, int size) |
205 | { | 205 | { |
206 | char tmpbuf[512]; | 206 | char tmpbuf[512]; |
207 | char *a = av, *b = bv; | 207 | char *a = av, *b = bv; |
@@ -225,7 +225,7 @@ void shuffle(void *array, int nelts, int eltsize, random_state *rs) | |||
225 | for (i = nelts; i-- > 1 ;) { | 225 | for (i = nelts; i-- > 1 ;) { |
226 | int j = random_upto(rs, i+1); | 226 | int j = random_upto(rs, i+1); |
227 | if (j != i) | 227 | if (j != i) |
228 | memswap(carray + eltsize * i, carray + eltsize * j, eltsize); | 228 | swap_regions(carray + eltsize * i, carray + eltsize * j, eltsize); |
229 | } | 229 | } |
230 | } | 230 | } |
231 | 231 | ||