diff options
Diffstat (limited to 'apps/database.c')
-rw-r--r-- | apps/database.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/apps/database.c b/apps/database.c index a84baa2a5c..6d74ce88a9 100644 --- a/apps/database.c +++ b/apps/database.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include "keyboard.h" | 43 | #include "keyboard.h" |
44 | #include "database.h" | 44 | #include "database.h" |
45 | #include "autoconf.h" | 45 | #include "autoconf.h" |
46 | #include "splash.h" | ||
46 | 47 | ||
47 | #if CONFIG_CODEC == SWCODEC | 48 | #if CONFIG_CODEC == SWCODEC |
48 | #include "playback.h" | 49 | #include "playback.h" |
@@ -94,7 +95,7 @@ int tagdb_init(void) | |||
94 | ptr[1] != 'D' || | 95 | ptr[1] != 'D' || |
95 | ptr[2] != 'B') | 96 | ptr[2] != 'B') |
96 | { | 97 | { |
97 | splash(HZ,true,"Not a rockbox ID3 database!"); | 98 | gui_syncsplash(HZ,true,"Not a rockbox ID3 database!"); |
98 | return -1; | 99 | return -1; |
99 | } | 100 | } |
100 | #ifdef ROCKBOX_LITTLE_ENDIAN | 101 | #ifdef ROCKBOX_LITTLE_ENDIAN |
@@ -106,7 +107,7 @@ int tagdb_init(void) | |||
106 | #endif | 107 | #endif |
107 | if ( (tagdbheader.version&0xFF) != TAGDB_VERSION) | 108 | if ( (tagdbheader.version&0xFF) != TAGDB_VERSION) |
108 | { | 109 | { |
109 | splash(HZ,true,"Unsupported database version %d!", | 110 | gui_syncsplash(HZ,true,"Unsupported database version %d!", |
110 | tagdbheader.version&0xFF); | 111 | tagdbheader.version&0xFF); |
111 | return -1; | 112 | return -1; |
112 | } | 113 | } |
@@ -115,7 +116,7 @@ int tagdb_init(void) | |||
115 | tagdbheader.albumstart > tagdbheader.songstart || | 116 | tagdbheader.albumstart > tagdbheader.songstart || |
116 | tagdbheader.artiststart > tagdbheader.albumstart) | 117 | tagdbheader.artiststart > tagdbheader.albumstart) |
117 | { | 118 | { |
118 | splash(HZ,true,"Corrupt ID3 database!"); | 119 | gui_syncsplash(HZ,true,"Corrupt ID3 database!"); |
119 | return -1; | 120 | return -1; |
120 | } | 121 | } |
121 | 122 | ||
@@ -232,7 +233,7 @@ void update_fentryoffsets(int start, int end) | |||
232 | } | 233 | } |
233 | } | 234 | } |
234 | if(fe.rundbentry!=-1) { | 235 | if(fe.rundbentry!=-1) { |
235 | splash(HZ*2,true, "o.o.. found a rundbentry? o.o; didn't update " | 236 | gui_syncsplash(HZ*2,true, "o.o.. found a rundbentry? o.o; didn't update " |
236 | "it, update the code o.o;"); | 237 | "it, update the code o.o;"); |
237 | } | 238 | } |
238 | } | 239 | } |
@@ -242,7 +243,7 @@ int tagdb_shiftdown(int targetoffset, int startingoffset, int bytes) | |||
242 | { | 243 | { |
243 | int amount; | 244 | int amount; |
244 | if(targetoffset>=startingoffset) { | 245 | if(targetoffset>=startingoffset) { |
245 | splash(HZ*2,true,"Woah. no beeping way. (tagdb_shiftdown)"); | 246 | gui_syncsplash(HZ*2,true,"Woah. no beeping way. (tagdb_shiftdown)"); |
246 | return 0; | 247 | return 0; |
247 | } | 248 | } |
248 | lseek(tagdb_fd,startingoffset,SEEK_SET); | 249 | lseek(tagdb_fd,startingoffset,SEEK_SET); |
@@ -253,7 +254,7 @@ int tagdb_shiftdown(int targetoffset, int startingoffset, int bytes) | |||
253 | written=write(tagdb_fd,sbuf,amount); | 254 | written=write(tagdb_fd,sbuf,amount); |
254 | targetoffset+=written; | 255 | targetoffset+=written; |
255 | if(amount!=written) { | 256 | if(amount!=written) { |
256 | splash(HZ*2,true,"Something went very wrong. expect database " | 257 | gui_syncsplash(HZ*2,true,"Something went very wrong. expect database " |
257 | "corruption. (tagdb_shiftdown)"); | 258 | "corruption. (tagdb_shiftdown)"); |
258 | return 0; | 259 | return 0; |
259 | } | 260 | } |
@@ -268,7 +269,7 @@ int tagdb_shiftup(int targetoffset, int startingoffset, int bytes) | |||
268 | int amount,amount2; | 269 | int amount,amount2; |
269 | int readpos,writepos,filelen; | 270 | int readpos,writepos,filelen; |
270 | if(targetoffset<=startingoffset) { | 271 | if(targetoffset<=startingoffset) { |
271 | splash(HZ*2,true,"Um. no. (tagdb_shiftup)"); | 272 | gui_syncsplash(HZ*2,true,"Um. no. (tagdb_shiftup)"); |
272 | return 0; | 273 | return 0; |
273 | } | 274 | } |
274 | filelen=lseek(tagdb_fd,0,SEEK_END); | 275 | filelen=lseek(tagdb_fd,0,SEEK_END); |
@@ -280,14 +281,14 @@ int tagdb_shiftup(int targetoffset, int startingoffset, int bytes) | |||
280 | lseek(tagdb_fd,readpos,SEEK_SET); | 281 | lseek(tagdb_fd,readpos,SEEK_SET); |
281 | amount2=read(tagdb_fd,sbuf,amount); | 282 | amount2=read(tagdb_fd,sbuf,amount); |
282 | if(amount2!=amount) { | 283 | if(amount2!=amount) { |
283 | splash(HZ*2,true,"Something went very wrong. expect database " | 284 | gui_syncsplash(HZ*2,true,"Something went very wrong. expect database " |
284 | "corruption. (tagdb_shiftup)"); | 285 | "corruption. (tagdb_shiftup)"); |
285 | return 0; | 286 | return 0; |
286 | } | 287 | } |
287 | lseek(tagdb_fd,writepos,SEEK_SET); | 288 | lseek(tagdb_fd,writepos,SEEK_SET); |
288 | amount=write(tagdb_fd,sbuf,amount2); | 289 | amount=write(tagdb_fd,sbuf,amount2); |
289 | if(amount2!=amount) { | 290 | if(amount2!=amount) { |
290 | splash(HZ*2,true,"Something went very wrong. expect database " | 291 | gui_syncsplash(HZ*2,true,"Something went very wrong. expect database " |
291 | "corruption. (tagdb_shiftup)"); | 292 | "corruption. (tagdb_shiftup)"); |
292 | return 0; | 293 | return 0; |
293 | } | 294 | } |
@@ -296,7 +297,7 @@ int tagdb_shiftup(int targetoffset, int startingoffset, int bytes) | |||
296 | if(bytes==0) | 297 | if(bytes==0) |
297 | return 1; | 298 | return 1; |
298 | else { | 299 | else { |
299 | splash(HZ*2,true,"Something went wrong, >.>;; (tagdb_shiftup)"); | 300 | gui_syncsplash(HZ*2,true,"Something went wrong, >.>;; (tagdb_shiftup)"); |
300 | return 0; | 301 | return 0; |
301 | } | 302 | } |
302 | } | 303 | } |
@@ -361,7 +362,7 @@ int rundb_init(void) | |||
361 | ptr[1] != 'R' || | 362 | ptr[1] != 'R' || |
362 | ptr[2] != 'D') | 363 | ptr[2] != 'D') |
363 | { | 364 | { |
364 | splash(HZ,true,"Not a rockbox runtime database!"); | 365 | gui_syncsplash(HZ,true,"Not a rockbox runtime database!"); |
365 | return -1; | 366 | return -1; |
366 | } | 367 | } |
367 | #ifdef ROCKBOX_LITTLE_ENDIAN | 368 | #ifdef ROCKBOX_LITTLE_ENDIAN |
@@ -373,7 +374,7 @@ int rundb_init(void) | |||
373 | #endif | 374 | #endif |
374 | if ( (rundbheader.version&0xFF) != RUNDB_VERSION) | 375 | if ( (rundbheader.version&0xFF) != RUNDB_VERSION) |
375 | { | 376 | { |
376 | splash(HZ,true,"Unsupported runtime database version %d!", | 377 | gui_syncsplash(HZ,true,"Unsupported runtime database version %d!", |
377 | rundbheader.version&0xFF); | 378 | rundbheader.version&0xFF); |
378 | return -1; | 379 | return -1; |
379 | } | 380 | } |