summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/pictureflow/pictureflow.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c
index 2a292fa594..7d94eeb31f 100644
--- a/apps/plugins/pictureflow/pictureflow.c
+++ b/apps/plugins/pictureflow/pictureflow.c
@@ -34,10 +34,6 @@
34#include "lib/mylcd.h" 34#include "lib/mylcd.h"
35#include "lib/feature_wrappers.h" 35#include "lib/feature_wrappers.h"
36 36
37#ifndef ALIGN_DOWN
38 #define ALIGN_DOWN(n, a) ((typeof(n))((uintptr_t)(n)/(a)*(a)))
39#endif
40
41/******************************* Globals ***********************************/ 37/******************************* Globals ***********************************/
42 38
43/* 39/*
@@ -218,7 +214,6 @@ typedef fb_data pix_t;
218#define PFREAL_ONE (1 << PFREAL_SHIFT) 214#define PFREAL_ONE (1 << PFREAL_SHIFT)
219#define PFREAL_HALF (PFREAL_ONE >> 1) 215#define PFREAL_HALF (PFREAL_ONE >> 1)
220 216
221
222#define IANGLE_MAX 1024 217#define IANGLE_MAX 1024
223#define IANGLE_MASK 1023 218#define IANGLE_MASK 1023
224 219
@@ -1134,7 +1129,9 @@ retry:
1134 avail += out; 1129 avail += out;
1135 borrowed += out; 1130 borrowed += out;
1136 1131
1137 struct track_data *new_tracks = (struct track_data *)(out + (uintptr_t)tracks); 1132 struct track_data *new_tracks =
1133 (struct track_data *)(out + (uintptr_t)tracks);
1134
1138 unsigned int bytes = track_count * sizeof(struct track_data); 1135 unsigned int bytes = track_count * sizeof(struct track_data);
1139 if (track_count) 1136 if (track_count)
1140 rb->memmove(new_tracks, tracks, bytes); 1137 rb->memmove(new_tracks, tracks, bytes);
@@ -1304,7 +1301,7 @@ static void draw_progressbar(int step)
1304 rb->yield(); 1301 rb->yield();
1305} 1302}
1306 1303
1307/* Calculate modified FNV hash of string 1304/* Calculate modified FNV hash of string
1308 * has good avalanche behaviour and uniform distribution 1305 * has good avalanche behaviour and uniform distribution
1309 * see http://home.comcast.net/~bretm/hash/ */ 1306 * see http://home.comcast.net/~bretm/hash/ */
1310static unsigned int mfnv(char *str) 1307static unsigned int mfnv(char *str)
@@ -1312,7 +1309,7 @@ static unsigned int mfnv(char *str)
1312 const unsigned int p = 16777619; 1309 const unsigned int p = 16777619;
1313 unsigned int hash = 0x811C9DC5; // 2166136261; 1310 unsigned int hash = 0x811C9DC5; // 2166136261;
1314 1311
1315 while(*str) 1312 while(*str)
1316 hash = (hash ^ *str++) * p; 1313 hash = (hash ^ *str++) * p;
1317 hash += hash << 13; 1314 hash += hash << 13;
1318 hash ^= hash >> 7; 1315 hash ^= hash >> 7;
@@ -2523,7 +2520,7 @@ static int main_menu(void)
2523 case PF_GOTO_WPS: /* WPS */ 2520 case PF_GOTO_WPS: /* WPS */
2524 return -2; 2521 return -2;
2525#if PF_PLAYBACK_CAPABLE 2522#if PF_PLAYBACK_CAPABLE
2526 case PF_MENU_CLEAR_PLAYLIST: 2523 case PF_MENU_CLEAR_PLAYLIST:
2527 if(rb->playlist_remove_all_tracks(NULL) == 0) { 2524 if(rb->playlist_remove_all_tracks(NULL) == 0) {
2528 rb->playlist_create(NULL, NULL); 2525 rb->playlist_create(NULL, NULL);
2529 rb->splash(HZ*2, ID2P(LANG_PLAYLIST_CLEARED)); 2526 rb->splash(HZ*2, ID2P(LANG_PLAYLIST_CLEARED));
@@ -2831,7 +2828,7 @@ static void draw_album_text(void)
2831 } 2828 }
2832 2829
2833 albumtxt_x = get_scroll_line_offset(PF_SCROLL_ALBUM); 2830 albumtxt_x = get_scroll_line_offset(PF_SCROLL_ALBUM);
2834 mylcd_putsxy(albumtxt_x, albumtxt_y, albumtxt); 2831 mylcd_putsxy(albumtxt_x, albumtxt_y, albumtxt);
2835 2832
2836 if ((show_album_name == ALBUM_AND_ARTIST_TOP) 2833 if ((show_album_name == ALBUM_AND_ARTIST_TOP)
2837 || (show_album_name == ALBUM_AND_ARTIST_BOTTOM)){ 2834 || (show_album_name == ALBUM_AND_ARTIST_BOTTOM)){
@@ -2871,7 +2868,7 @@ static int pictureflow_main(void)
2871 } 2868 }
2872 } 2869 }
2873 2870
2874 configfile_load(CONFIG_FILE, config, CONFIG_NUM_ITEMS, CONFIG_VERSION); 2871 configfile_load(CONFIG_FILE, config, CONFIG_NUM_ITEMS, CONFIG_VERSION);
2875 if(auto_wps == 0) 2872 if(auto_wps == 0)
2876 draw_splashscreen(); 2873 draw_splashscreen();
2877 if(backlight_mode == 0) { 2874 if(backlight_mode == 0) {