From 4d6374c9236b93e0bd457f99944164fc493d1120 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Fri, 16 Mar 2007 21:56:08 +0000 Subject: Get rid of the 'center' parameter for splashes. There were only 2 of almost 500 splashes which were not centered. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12807 a1c6a512-1295-4272-9138-f99709370657 --- apps/action.c | 6 +-- apps/alarm_menu.c | 6 +-- apps/bookmark.c | 4 +- apps/codecs.c | 2 +- apps/codecs.h | 6 +-- apps/codecs/speex.c | 2 +- apps/codecs/vorbis.c | 2 +- apps/debug_menu.c | 12 +++--- apps/filetree.c | 38 ++++++++--------- apps/filetypes.c | 16 ++++---- apps/gui/color_picker.c | 2 +- apps/gui/gwps-common.c | 10 ++--- apps/gui/splash.c | 64 ++++++++++++----------------- apps/gui/splash.h | 13 ++---- apps/main.c | 10 ++--- apps/menus/eq_menu.c | 6 +-- apps/menus/main_menu.c | 2 +- apps/menus/playback_menu.c | 4 +- apps/menus/recording_menu.c | 2 +- apps/menus/settings_menu.c | 6 +-- apps/misc.c | 8 ++-- apps/onplay.c | 14 +++---- apps/playback.c | 8 ++-- apps/playlist.c | 56 ++++++++++++------------- apps/playlist_catalog.c | 8 ++-- apps/playlist_viewer.c | 8 ++-- apps/plugin.c | 18 ++++---- apps/plugin.h | 2 +- apps/plugins/alpine_cdc.c | 4 +- apps/plugins/battery_bench.c | 6 +-- apps/plugins/blackjack.c | 20 ++++----- apps/plugins/brickmania.c | 6 +-- apps/plugins/bubbles.c | 24 +++++------ apps/plugins/calculator.c | 4 +- apps/plugins/chessbox/chessbox.c | 14 +++---- apps/plugins/chessclock.c | 2 +- apps/plugins/chip8.c | 6 +-- apps/plugins/chopper.c | 8 ++-- apps/plugins/clock.c | 6 +-- apps/plugins/cube.c | 4 +- apps/plugins/dict.c | 6 +-- apps/plugins/disktidy.c | 4 +- apps/plugins/doom/rockdoom.c | 4 +- apps/plugins/doom/v_video.c | 2 +- apps/plugins/fire.c | 2 +- apps/plugins/firmware_flash.c | 22 +++++----- apps/plugins/flipit.c | 2 +- apps/plugins/helloworld.c | 2 +- apps/plugins/invadrox.c | 6 +-- apps/plugins/iriver_flash.c | 58 +++++++++++++------------- apps/plugins/iriverify.c | 12 +++--- apps/plugins/jewels.c | 18 ++++---- apps/plugins/jpeg.c | 14 +++---- apps/plugins/lib/overlay.c | 14 +++---- apps/plugins/logo.c | 2 +- apps/plugins/mazezam.c | 4 +- apps/plugins/midi/guspat.c | 2 +- apps/plugins/midi/synth.c | 7 ++-- apps/plugins/midi2wav.c | 12 +++--- apps/plugins/minesweeper.c | 6 +-- apps/plugins/mosaique.c | 2 +- apps/plugins/mpegplayer/mpegplayer.c | 20 ++++----- apps/plugins/nim.c | 2 +- apps/plugins/pacbox/pacbox.c | 4 +- apps/plugins/pong.c | 4 +- apps/plugins/random_folder_advance_config.c | 6 +-- apps/plugins/rockblox.c | 8 ++-- apps/plugins/rockbox_flash.c | 22 +++++----- apps/plugins/rockboy/cpu.c | 2 +- apps/plugins/rockboy/dynarec.c | 2 +- apps/plugins/rockboy/loader.c | 8 ++-- apps/plugins/rockboy/menu.c | 2 +- apps/plugins/rockboy/rockboy.c | 6 +-- apps/plugins/rockpaint.c | 12 +++--- apps/plugins/search.c | 10 ++--- apps/plugins/searchengine/parser.c | 4 +- apps/plugins/searchengine/searchengine.c | 4 +- apps/plugins/searchengine/token.c | 8 ++-- apps/plugins/snake2.c | 8 ++-- apps/plugins/snow.c | 2 +- apps/plugins/sokoban.c | 7 ++-- apps/plugins/solitaire.c | 4 +- apps/plugins/sort.c | 14 +++---- apps/plugins/splitedit.c | 41 ++++++++---------- apps/plugins/stats.c | 6 +-- apps/plugins/sudoku/sudoku.c | 20 ++++----- apps/plugins/test_disk.c | 28 ++++++------- apps/plugins/text_editor.c | 6 +-- apps/plugins/vbrfix.c | 4 +- apps/plugins/video.c | 2 +- apps/plugins/viewer.c | 8 ++-- apps/plugins/vu_meter.c | 4 +- apps/plugins/wav2wv.c | 24 +++++------ apps/plugins/wavplay.c | 20 ++++----- apps/plugins/wormlet.c | 2 +- apps/plugins/xobox.c | 14 +++---- apps/plugins/zxbox/interf.c | 4 +- apps/plugins/zxbox/snapshot.c | 2 +- apps/plugins/zxbox/spmain.c | 6 +-- apps/plugins/zxbox/zxbox.c | 2 +- apps/recorder/radio.c | 16 ++++---- apps/recorder/recording.c | 8 ++-- apps/root_menu.c | 10 ++--- apps/screens.c | 6 +-- apps/settings.c | 10 ++--- apps/tagtree.c | 22 +++++----- apps/tree.c | 8 ++-- 107 files changed, 524 insertions(+), 548 deletions(-) diff --git a/apps/action.c b/apps/action.c index 31770cdb4e..80053e7646 100644 --- a/apps/action.c +++ b/apps/action.c @@ -131,7 +131,7 @@ static int get_action_worker(int context, int timeout, { last_button = BUTTON_NONE; keys_locked = false; - gui_syncsplash(HZ/2, true, str(LANG_KEYLOCK_OFF_PLAYER)); + gui_syncsplash(HZ/2, str(LANG_KEYLOCK_OFF_PLAYER)); return ACTION_REDRAW; } else @@ -140,7 +140,7 @@ static int get_action_worker(int context, int timeout, #endif { if ((button&BUTTON_REL)) - gui_syncsplash(HZ/2, true, str(LANG_KEYLOCK_ON_PLAYER)); + gui_syncsplash(HZ/2, str(LANG_KEYLOCK_ON_PLAYER)); return ACTION_REDRAW; } } @@ -180,7 +180,7 @@ static int get_action_worker(int context, int timeout, unlock_combo = button; keys_locked = true; action_signalscreenchange(); - gui_syncsplash(HZ/2, true, str(LANG_KEYLOCK_ON_PLAYER)); + gui_syncsplash(HZ/2, str(LANG_KEYLOCK_ON_PLAYER)); button_clear_queue(); return ACTION_REDRAW; diff --git a/apps/alarm_menu.c b/apps/alarm_menu.c index 47c28c43f4..f537aeac95 100644 --- a/apps/alarm_menu.c +++ b/apps/alarm_menu.c @@ -97,11 +97,11 @@ bool alarm_screen(void) rtc_init(); rtc_set_alarm(h,m); rtc_enable_alarm(true); - gui_syncsplash(HZ*2, true, str(LANG_ALARM_MOD_TIME_TO_GO), + gui_syncsplash(HZ*2, str(LANG_ALARM_MOD_TIME_TO_GO), togo / 60, togo % 60); done = true; } else { - gui_syncsplash(HZ, true, str(LANG_ALARM_MOD_ERROR)); + gui_syncsplash(HZ, str(LANG_ALARM_MOD_ERROR)); update = true; } break; @@ -144,7 +144,7 @@ bool alarm_screen(void) case ACTION_STD_CANCEL: rtc_enable_alarm(false); - gui_syncsplash(HZ*2, true, str(LANG_ALARM_MOD_DISABLE)); + gui_syncsplash(HZ*2, str(LANG_ALARM_MOD_DISABLE)); done = true; break; diff --git a/apps/bookmark.c b/apps/bookmark.c index 5905fdcd7a..a86e2a6504 100644 --- a/apps/bookmark.c +++ b/apps/bookmark.c @@ -226,7 +226,7 @@ static bool write_bookmark(bool create_bookmark_file) } } - gui_syncsplash(HZ, true, str(success ? LANG_BOOKMARK_CREATE_SUCCESS + gui_syncsplash(HZ, str(success ? LANG_BOOKMARK_CREATE_SUCCESS : LANG_BOOKMARK_CREATE_FAILURE)); return true; @@ -520,7 +520,7 @@ static char* select_bookmark(const char* bookmark_file_name) /* if there were no bookmarks in the file, delete the file and exit. */ if(bookmark_id <= 0) { - gui_syncsplash(HZ, true, str(LANG_BOOKMARK_LOAD_EMPTY)); + gui_syncsplash(HZ, str(LANG_BOOKMARK_LOAD_EMPTY)); remove(bookmark_file_name); action_signalscreenchange(); return NULL; diff --git a/apps/codecs.c b/apps/codecs.c index ccfa449d51..1de83588c1 100644 --- a/apps/codecs.c +++ b/apps/codecs.c @@ -312,7 +312,7 @@ int codec_load_file(const char *plugin, struct codec_api *api) if (fd < 0) { snprintf(msgbuf, sizeof(msgbuf)-1, "Couldn't load codec: %s", path); logf("Codec load error:%d", fd); - gui_syncsplash(HZ*2, true, msgbuf); + gui_syncsplash(HZ*2, msgbuf); return fd; } diff --git a/apps/codecs.h b/apps/codecs.h index ceba2bf852..7c7224ec80 100644 --- a/apps/codecs.h +++ b/apps/codecs.h @@ -90,12 +90,12 @@ #define CODEC_ENC_MAGIC 0x52454E43 /* RENC */ /* increase this every time the api struct changes */ -#define CODEC_API_VERSION 16 +#define CODEC_API_VERSION 17 /* update this to latest version if a change to the api struct breaks backwards compatibility (and please take the opportunity to sort in any new function which are "waiting" at the end of the function table) */ -#define CODEC_MIN_API_VERSION 16 +#define CODEC_MIN_API_VERSION 17 /* codec return codes */ enum codec_status { @@ -166,7 +166,7 @@ struct codec_api { /* Configure different codec buffer parameters. */ void (*configure)(int setting, intptr_t value); - void (*splash)(int ticks, bool center, const unsigned char *fmt, ...); + void (*splash)(int ticks, const unsigned char *fmt, ...); /* file */ int (*PREFIX(open))(const char* pathname, int flags); diff --git a/apps/codecs/speex.c b/apps/codecs/speex.c index 8dd9f012dd..348fa4e317 100644 --- a/apps/codecs/speex.c +++ b/apps/codecs/speex.c @@ -288,7 +288,7 @@ int speex_seek_page_granule(spx_int64_t pos, spx_int64_t curpos, LOGF("Seek failed:%d\n", offset); - ci->splash(HZ*2, true, "Seek failed"); + ci->splash(HZ*2, "Seek failed"); return -1; } diff --git a/apps/codecs/vorbis.c b/apps/codecs/vorbis.c index 7e7ef365b2..2ea0f74645 100644 --- a/apps/codecs/vorbis.c +++ b/apps/codecs/vorbis.c @@ -79,7 +79,7 @@ bool vorbis_set_codec_parameters(OggVorbis_File *vf) vi = ov_info(vf, -1); if (vi == NULL) { - //ci->splash(HZ*2, true, "Vorbis Error"); + //ci->splash(HZ*2, "Vorbis Error"); return false; } diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 71094c0dd9..c3532dbf8b 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -2030,7 +2030,7 @@ static bool dbg_save_roms(void) err = eeprom_24cxx_read(0, buf, sizeof buf); if (err) - gui_syncsplash(HZ*3, true, "Eeprom read failure (%d)",err); + gui_syncsplash(HZ*3, "Eeprom read failure (%d)",err); else { write(fd, buf, sizeof buf); @@ -2123,7 +2123,7 @@ extern bool do_screendump_instead_of_usb; static bool dbg_screendump(void) { do_screendump_instead_of_usb = !do_screendump_instead_of_usb; - gui_syncsplash(HZ, true, "Screendump %s", + gui_syncsplash(HZ, "Screendump %s", do_screendump_instead_of_usb?"enabled":"disabled"); return false; } @@ -2314,21 +2314,21 @@ static bool dbg_write_eeprom(void) err = eeprom_24cxx_write(0, buf, sizeof buf); if (err) - gui_syncsplash(HZ*3, true, "Eeprom write failure (%d)",err); + gui_syncsplash(HZ*3, "Eeprom write failure (%d)",err); else - gui_syncsplash(HZ*3, true, "Eeprom written successfully"); + gui_syncsplash(HZ*3, "Eeprom written successfully"); set_irq_level(old_irq_level); } else { - gui_syncsplash(HZ*3, true, "File read error (%d)",rc); + gui_syncsplash(HZ*3, "File read error (%d)",rc); } close(fd); } else { - gui_syncsplash(HZ*3, true, "Failed to open 'internal_eeprom.bin'"); + gui_syncsplash(HZ*3, "Failed to open 'internal_eeprom.bin'"); } return false; diff --git a/apps/filetree.c b/apps/filetree.c index edf4fa0b63..b875e81d48 100644 --- a/apps/filetree.c +++ b/apps/filetree.c @@ -360,14 +360,14 @@ int ft_enter(struct tree_context* c) switch ( file->attr & TREE_ATTR_MASK ) { case TREE_ATTR_M3U: if (global_settings.party_mode) { - gui_syncsplash(HZ, true, str(LANG_PARTY_MODE)); + gui_syncsplash(HZ, str(LANG_PARTY_MODE)); break; } if (bookmark_autoload(buf)) break; - gui_syncsplash(0, true, str(LANG_WAIT)); + gui_syncsplash(0, str(LANG_WAIT)); /* about to create a new current playlist... allow user to cancel the operation */ @@ -395,7 +395,7 @@ int ft_enter(struct tree_context* c) if (bookmark_autoload(c->currdir)) break; - gui_syncsplash(0, true, str(LANG_WAIT)); + gui_syncsplash(0, str(LANG_WAIT)); /* about to create a new current playlist... allow user to cancel the operation */ @@ -414,7 +414,7 @@ int ft_enter(struct tree_context* c) { playlist_insert_track(NULL, buf, PLAYLIST_INSERT_LAST, true, true); - gui_syncsplash(HZ, true, str(LANG_QUEUE_LAST)); + gui_syncsplash(HZ, str(LANG_QUEUE_LAST)); } else if (playlist_create(c->currdir, NULL) != -1) { @@ -439,7 +439,7 @@ int ft_enter(struct tree_context* c) /* fmr preset file */ case TREE_ATTR_FMR: - gui_syncsplash(0, true, str(LANG_WAIT)); + gui_syncsplash(0, str(LANG_WAIT)); /* Preset inside the default folder. */ if(!strncasecmp(FMPRESET_PATH, buf, strlen(FMPRESET_PATH))) @@ -466,7 +466,7 @@ int ft_enter(struct tree_context* c) /* wps config file */ case TREE_ATTR_WPS: - gui_syncsplash(0, true, str(LANG_WAIT)); + gui_syncsplash(0, str(LANG_WAIT)); #if LCD_DEPTH > 1 unload_wps_backdrop(); #endif @@ -478,7 +478,7 @@ int ft_enter(struct tree_context* c) #if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1) /* remote-wps config file */ case TREE_ATTR_RWPS: - gui_syncsplash(0, true, str(LANG_WAIT)); + gui_syncsplash(0, str(LANG_WAIT)); wps_data_load(gui_wps[1].data, buf, true); set_file(buf, (char *)global_settings.rwps_file, MAX_FILENAME); @@ -486,39 +486,39 @@ int ft_enter(struct tree_context* c) #endif case TREE_ATTR_CFG: - gui_syncsplash(0, true, str(LANG_WAIT)); + gui_syncsplash(0, str(LANG_WAIT)); if (!settings_load_config(buf,true)) break; - gui_syncsplash(HZ, true, str(LANG_SETTINGS_LOADED)); + gui_syncsplash(HZ, str(LANG_SETTINGS_LOADED)); break; case TREE_ATTR_BMARK: - gui_syncsplash(0, true, str(LANG_WAIT)); + gui_syncsplash(0, str(LANG_WAIT)); bookmark_load(buf, false); reload_dir = true; break; case TREE_ATTR_LNG: - gui_syncsplash(0, true, str(LANG_WAIT)); + gui_syncsplash(0, str(LANG_WAIT)); if(!lang_load(buf)) { set_file(buf, (char *)global_settings.lang_file, MAX_FILENAME); talk_init(); /* use voice of same language */ - gui_syncsplash(HZ, true, str(LANG_LANGUAGE_LOADED)); + gui_syncsplash(HZ, str(LANG_LANGUAGE_LOADED)); } break; #ifdef HAVE_LCD_BITMAP case TREE_ATTR_FONT: - gui_syncsplash(0, true, str(LANG_WAIT)); + gui_syncsplash(0, str(LANG_WAIT)); font_load(buf); set_file(buf, (char *)global_settings.font_file, MAX_FILENAME); break; case TREE_ATTR_KBD: - gui_syncsplash(0, true, str(LANG_WAIT)); + gui_syncsplash(0, str(LANG_WAIT)); if (!load_kbd(buf)) - gui_syncsplash(HZ, true, str(LANG_KEYBOARD_LOADED)); + gui_syncsplash(HZ, str(LANG_KEYBOARD_LOADED)); set_file(buf, (char *)global_settings.kbd_file, MAX_FILENAME); break; #endif @@ -526,7 +526,7 @@ int ft_enter(struct tree_context* c) #ifndef SIMULATOR /* firmware file */ case TREE_ATTR_MOD: - gui_syncsplash(0, true, str(LANG_WAIT)); + gui_syncsplash(0, str(LANG_WAIT)); rolo_load(buf); break; #endif @@ -534,11 +534,11 @@ int ft_enter(struct tree_context* c) /* plugin file */ case TREE_ATTR_ROCK: if (global_settings.party_mode) { - gui_syncsplash(HZ, true, str(LANG_PARTY_MODE)); + gui_syncsplash(HZ, str(LANG_PARTY_MODE)); break; } - gui_syncsplash(0, true, str(LANG_WAIT)); + gui_syncsplash(0, str(LANG_WAIT)); if (plugin_load(buf,NULL) == PLUGIN_USB_CONNECTED) { @@ -560,7 +560,7 @@ int ft_enter(struct tree_context* c) char* plugin; if (global_settings.party_mode) { - gui_syncsplash(HZ, true, str(LANG_PARTY_MODE)); + gui_syncsplash(HZ, str(LANG_PARTY_MODE)); break; } diff --git a/apps/filetypes.c b/apps/filetypes.c index c26b50bb0f..49ce1c72aa 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c @@ -340,14 +340,14 @@ static void scan_plugins(void) /* exttypes[] full, bail out */ if (cnt_exttypes >= MAX_EXTTYPES) { - gui_syncsplash(HZ, true, str(LANG_FILETYPES_EXTENSION_FULL)); + gui_syncsplash(HZ, str(LANG_FILETYPES_EXTENSION_FULL)); break; } /* filetypes[] full, bail out */ if (cnt_filetypes >= MAX_FILETYPES) { - gui_syncsplash(HZ, true, str(LANG_FILETYPES_FULL)); + gui_syncsplash(HZ, str(LANG_FILETYPES_FULL)); break; } @@ -380,7 +380,7 @@ static void scan_plugins(void) /* filter out to long filenames */ if (strlen((char *)entry->d_name) > MAX_PLUGIN_LENGTH + 5) { - gui_syncsplash(HZ, true, str(LANG_FILETYPES_PLUGIN_NAME_LONG)); + gui_syncsplash(HZ, str(LANG_FILETYPES_PLUGIN_NAME_LONG)); continue; } @@ -561,13 +561,13 @@ static bool read_config(const char* file) { if (cnt_exttypes >= MAX_EXTTYPES) { - gui_syncsplash(HZ, true, str(LANG_FILETYPES_EXTENSION_FULL)); + gui_syncsplash(HZ, str(LANG_FILETYPES_EXTENSION_FULL)); break; } if (cnt_filetypes >= MAX_FILETYPES) { - gui_syncsplash(HZ, true, str(LANG_FILETYPES_FULL)); + gui_syncsplash(HZ, str(LANG_FILETYPES_FULL)); break; } @@ -636,7 +636,7 @@ static bool read_config(const char* file) { if (strlen(str[plugin]) > MAX_PLUGIN_LENGTH) { - gui_syncsplash(HZ, true, str(LANG_FILETYPES_PLUGIN_NAME_LONG)); + gui_syncsplash(HZ, str(LANG_FILETYPES_PLUGIN_NAME_LONG)); str[plugin] = NULL; continue; } @@ -736,7 +736,7 @@ static char* string2icon(const char* str) (unsigned long) string_buffer - (unsigned long) next_free_string) < ICON_LENGTH) { - gui_syncsplash(HZ, true, str(LANG_FILETYPES_STRING_BUFFER_EMPTY)); + gui_syncsplash(HZ, str(LANG_FILETYPES_STRING_BUFFER_EMPTY)); return NULL; } @@ -792,7 +792,7 @@ static char* get_string(const char* str) } else { - gui_syncsplash(HZ, true, str(LANG_FILETYPES_STRING_BUFFER_EMPTY)); + gui_syncsplash(HZ, str(LANG_FILETYPES_STRING_BUFFER_EMPTY)); return NULL; } } diff --git a/apps/gui/color_picker.c b/apps/gui/color_picker.c index 08c05d958f..2d0dba1221 100644 --- a/apps/gui/color_picker.c +++ b/apps/gui/color_picker.c @@ -392,7 +392,7 @@ bool set_color(struct screen *display, char *title, unsigned *color, if (banned_color != (unsigned)-1 && banned_color == rgb.color) { - gui_syncsplash(HZ*2, true, str(LANG_COLOR_UNACCEPTABLE)); + gui_syncsplash(HZ*2, str(LANG_COLOR_UNACCEPTABLE)); break; } *color = rgb.color; diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index 2f86c9dedb..24ecd8b051 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c @@ -2336,8 +2336,8 @@ bool update_onvol_change(struct gui_wps * gwps) gui_wps_refresh(gwps, 0, WPS_REFRESH_NON_STATIC); #ifdef HAVE_LCD_CHARCELLS - gui_splash(gwps->display,0, false, "Vol: %d dB ", - sound_val2phys(SOUND_VOLUME, global_settings.volume)); + gui_splash(gwps->display, 0, "Vol: %3d dB", + sound_val2phys(SOUND_VOLUME, global_settings.volume)); return true; #endif return false; @@ -2494,10 +2494,10 @@ bool gui_wps_display(void) { global_status.resume_index = -1; #ifdef HAVE_LCD_CHARCELLS - gui_syncsplash(HZ, true, str(LANG_END_PLAYLIST_PLAYER)); + gui_syncsplash(HZ, str(LANG_END_PLAYLIST_PLAYER)); #else gui_syncstatusbar_draw(&statusbars, true); - gui_syncsplash(HZ, true, str(LANG_END_PLAYLIST_RECORDER)); + gui_syncsplash(HZ, str(LANG_END_PLAYLIST_RECORDER)); #endif return true; } @@ -2651,6 +2651,6 @@ void display_keylock_text(bool locked) else s = str(LANG_KEYLOCK_OFF_RECORDER); #endif - gui_syncsplash(HZ, true, s); + gui_syncsplash(HZ, s); } diff --git a/apps/gui/splash.c b/apps/gui/splash.c index 30909217b2..4234171207 100644 --- a/apps/gui/splash.c +++ b/apps/gui/splash.c @@ -39,8 +39,7 @@ #endif -static void splash(struct screen * screen, bool center, - const char *fmt, va_list ap) +static void splash(struct screen * screen, const char *fmt, va_list ap) { char splash_buf[MAXBUFFER]; short widths[MAXLINES]; @@ -127,43 +126,33 @@ static void splash(struct screen * screen, bool center, #ifdef HAVE_LCD_BITMAP /* If we center the display, then just clear the box we need and put a nice little frame and put the text in there! */ - if (center) - { - y = (screen->height - y) / 2; /* height => y start position */ - x = (screen->width - maxw) / 2 - 2; + y = (screen->height - y) / 2; /* height => y start position */ + x = (screen->width - maxw) / 2 - 2; #if LCD_DEPTH > 1 - if (screen->depth > 1) - { - prevfg = screen->get_foreground(); - screen->set_drawmode(DRMODE_FG); - screen->set_foreground( - SCREEN_COLOR_TO_NATIVE(screen, LCD_LIGHTGRAY)); - } - else + if (screen->depth > 1) + { + prevfg = screen->get_foreground(); + screen->set_drawmode(DRMODE_FG); + screen->set_foreground( + SCREEN_COLOR_TO_NATIVE(screen, LCD_LIGHTGRAY)); + } + else #endif - screen->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); + screen->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); - screen->fillrect(x, y-2, maxw+4, screen->height-y*2+4); + screen->fillrect(x, y-2, maxw+4, screen->height-y*2+4); #if LCD_DEPTH > 1 - if (screen->depth > 1) - screen->set_foreground( - SCREEN_COLOR_TO_NATIVE(screen, LCD_BLACK)); - else + if (screen->depth > 1) + screen->set_foreground(SCREEN_COLOR_TO_NATIVE(screen, LCD_BLACK)); + else #endif - screen->set_drawmode(DRMODE_SOLID); + screen->set_drawmode(DRMODE_SOLID); - screen->drawrect(x, y-2, maxw+4, screen->height-y*2+4); - } - else - { - y = 0; - x = 0; - screen->clear_display(); - } + screen->drawrect(x, y-2, maxw+4, screen->height-y*2+4); #else /* HAVE_LCD_CHARCELLS */ - y = 0; /* vertical center on 2 lines would be silly */ + y = 0; /* vertical centering on 2 lines would be silly */ x = 0; screen->clear_display(); #endif @@ -172,8 +161,7 @@ static void splash(struct screen * screen, bool center, for (i = 0; i <= line; i++) { - if (center) - x = MAX((screen->width - widths[i]) / 2, 0); + x = MAX((screen->width - widths[i]) / 2, 0); #ifdef HAVE_LCD_BITMAP screen->putsxy(x, y, lines[i]); @@ -184,7 +172,7 @@ static void splash(struct screen * screen, bool center, } #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH > 1) - if (center && screen->depth > 1) + if (screen->depth > 1) { screen->set_foreground(prevfg); screen->set_drawmode(DRMODE_SOLID); @@ -195,25 +183,25 @@ static void splash(struct screen * screen, bool center, #endif } -void gui_splash(struct screen * screen, int ticks, - bool center, const unsigned char *fmt, ...) +void gui_splash(struct screen * screen, int ticks, + const unsigned char *fmt, ...) { va_list ap; va_start( ap, fmt ); - splash(screen, center, fmt, ap); + splash(screen, fmt, ap); va_end( ap ); if(ticks) sleep(ticks); } -void gui_syncsplash(int ticks, bool center, const unsigned char *fmt, ...) +void gui_syncsplash(int ticks, const unsigned char *fmt, ...) { va_list ap; int i; va_start( ap, fmt ); FOR_NB_SCREENS(i) - splash(&(screens[i]), center, fmt, ap); + splash(&(screens[i]), fmt, ap); va_end( ap ); if(ticks) diff --git a/apps/gui/splash.h b/apps/gui/splash.h index b1ac15c537..589be95033 100644 --- a/apps/gui/splash.h +++ b/apps/gui/splash.h @@ -22,24 +22,19 @@ #include "screen_access.h" /* - * Puts a splash message on the given screen for a given period + * Puts a splash message centered on the given screen for a given period * - screen : the screen to put the splash on * - ticks : how long the splash is displayed (in rb ticks) - * - center : FALSE means left-justified, TRUE means - * horizontal and vertical center * - fmt : what to say *printf style */ extern void gui_splash(struct screen * screen, int ticks, - bool center, const char *fmt, ...); + const char *fmt, ...); /* - * Puts a splash message on all the screens for a given period + * Puts a splash message centered on all the screens for a given period * - ticks : how long the splash is displayed (in rb ticks) - * - center : FALSE means left-justified, TRUE means - * horizontal and vertical center * - fmt : what to say *printf style */ -extern void gui_syncsplash(int ticks, bool center, - const unsigned char *fmt, ...); +extern void gui_syncsplash(int ticks, const unsigned char *fmt, ...); #endif /* _GUI_ICON_H_ */ diff --git a/apps/main.c b/apps/main.c index 8ad32446b3..916720a5d3 100644 --- a/apps/main.c +++ b/apps/main.c @@ -146,7 +146,7 @@ static int init_dircache(bool preinit) { /* This will be in default language, settings are not applied yet. Not really any easy way to fix that. */ - gui_syncsplash(0, true, str(LANG_DIRCACHE_BUILDING)); + gui_syncsplash(0, str(LANG_DIRCACHE_BUILDING)); clear = true; } @@ -164,14 +164,14 @@ static int init_dircache(bool preinit) { if (global_status.dircache_size <= 0) { - gui_syncsplash(0, true, str(LANG_DIRCACHE_BUILDING)); + gui_syncsplash(0, str(LANG_DIRCACHE_BUILDING)); clear = true; } result = dircache_build(global_status.dircache_size); } if (result < 0) - gui_syncsplash(0, true, "Failed! Result: %d", result); + gui_syncsplash(0, "Failed! Result: %d", result); } if (clear) @@ -206,7 +206,7 @@ static void init_tagcache(void) if (ret > 0) { #ifdef HAVE_LCD_BITMAP - gui_syncsplash(0, true, "%s [%d/%d]", + gui_syncsplash(0, "%s [%d/%d]", str(LANG_TAGCACHE_INIT), ret, tagcache_get_max_commit_step()); #else @@ -458,7 +458,7 @@ static void init(void) if (button_hold()) #endif { - gui_syncsplash(HZ*2, true, str(LANG_RESET_DONE_CLEAR)); + gui_syncsplash(HZ*2, str(LANG_RESET_DONE_CLEAR)); settings_reset(); } else diff --git a/apps/menus/eq_menu.c b/apps/menus/eq_menu.c index 65b17a73c9..0cf63bb20d 100644 --- a/apps/menus/eq_menu.c +++ b/apps/menus/eq_menu.c @@ -589,12 +589,12 @@ static bool eq_save_preset(void) if (!kbd_input(filename, sizeof filename)) { fd = creat(filename); if (fd < 0) - gui_syncsplash(HZ, true, str(LANG_FAILED)); + gui_syncsplash(HZ, str(LANG_FAILED)); else break; } else { - gui_syncsplash(HZ, true, str(LANG_MENU_SETTING_CANCEL)); + gui_syncsplash(HZ, str(LANG_MENU_SETTING_CANCEL)); return false; } } @@ -613,7 +613,7 @@ static bool eq_save_preset(void) close(fd); - gui_syncsplash(HZ, true, str(LANG_SETTINGS_SAVED)); + gui_syncsplash(HZ, str(LANG_SETTINGS_SAVED)); return true; } diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c index 0e7e7f7bc2..2e034162e5 100644 --- a/apps/menus/main_menu.c +++ b/apps/menus/main_menu.c @@ -320,7 +320,7 @@ static bool show_info(void) #ifndef SIMULATOR case ACTION_STD_OK: - gui_syncsplash(0, true, str(LANG_DIRCACHE_BUILDING)); + gui_syncsplash(0, str(LANG_DIRCACHE_BUILDING)); fat_recalc_free(IF_MV(0)); #ifdef HAVE_MULTIVOLUME if (fat_ismounted(1)) diff --git a/apps/menus/playback_menu.c b/apps/menus/playback_menu.c index ebfb52eaa0..1f6c96e421 100644 --- a/apps/menus/playback_menu.c +++ b/apps/menus/playback_menu.c @@ -136,7 +136,7 @@ int audioscrobbler_callback(int action,const struct menu_item_ex *this_item) { case ACTION_EXIT_MENUITEM: /* on exit */ if (!scrobbler_is_enabled() && global_settings.audioscrobbler) - gui_syncsplash(HZ*2, true, str(LANG_PLEASE_REBOOT)); + gui_syncsplash(HZ*2, str(LANG_PLEASE_REBOOT)); if(scrobbler_is_enabled() && !global_settings.audioscrobbler) scrobbler_shutdown(); @@ -154,7 +154,7 @@ int cuesheet_callback(int action,const struct menu_item_ex *this_item) { case ACTION_EXIT_MENUITEM: /* on exit */ if (!cuesheet_is_enabled() && global_settings.cuesheet) - gui_syncsplash(HZ*2, true, str(LANG_PLEASE_REBOOT)); + gui_syncsplash(HZ*2, str(LANG_PLEASE_REBOOT)); break; } return action; diff --git a/apps/menus/recording_menu.c b/apps/menus/recording_menu.c index 6173c15501..76763b101d 100644 --- a/apps/menus/recording_menu.c +++ b/apps/menus/recording_menu.c @@ -638,7 +638,7 @@ bool rectrigger(void) switch (button) { case ACTION_STD_CANCEL: - gui_syncsplash(50, true, str(LANG_MENU_SETTING_CANCEL)); + gui_syncsplash(50, str(LANG_MENU_SETTING_CANCEL)); global_settings.rec_start_thres = old_start_thres; global_settings.rec_start_duration = old_start_duration; global_settings.rec_prerecord_time = old_prerecord_time; diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index dd9ad731bb..27d44fd1cf 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c @@ -49,13 +49,13 @@ static void tagcache_rebuild_with_splash(void) { tagcache_rebuild(); - gui_syncsplash(HZ*2, true, str(LANG_TAGCACHE_FORCE_UPDATE_SPLASH)); + gui_syncsplash(HZ*2, str(LANG_TAGCACHE_FORCE_UPDATE_SPLASH)); } static void tagcache_update_with_splash(void) { tagcache_update(); - gui_syncsplash(HZ*2, true, str(LANG_TAGCACHE_FORCE_UPDATE_SPLASH)); + gui_syncsplash(HZ*2, str(LANG_TAGCACHE_FORCE_UPDATE_SPLASH)); } #ifdef HAVE_TC_RAMCACHE @@ -163,7 +163,7 @@ static int dircache_callback(int action,const struct menu_item_ex *this_item) { case true: if (!dircache_is_enabled()) - gui_syncsplash(HZ*2, true, str(LANG_PLEASE_REBOOT)); + gui_syncsplash(HZ*2, str(LANG_PLEASE_REBOOT)); break; case false: if (dircache_is_enabled()) diff --git a/apps/misc.c b/apps/misc.c index 22f6fb50a6..57599de456 100644 --- a/apps/misc.c +++ b/apps/misc.c @@ -608,11 +608,11 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter) x5_backlight_shutdown(); #endif if (!battery_level_safe()) - gui_syncsplash(3*HZ, true, "%s %s", + gui_syncsplash(3*HZ, "%s %s", str(LANG_WARNING_BATTERY_EMPTY), str(LANG_SHUTTINGDOWN)); else if (battery_level_critical()) - gui_syncsplash(3*HZ, true, "%s %s", + gui_syncsplash(3*HZ, "%s %s", str(LANG_WARNING_BATTERY_LOW), str(LANG_SHUTTINGDOWN)); else { @@ -620,11 +620,11 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter) if (!tagcache_prepare_shutdown()) { cancel_shutdown(); - gui_syncsplash(HZ, true, str(LANG_TAGCACHE_BUSY)); + gui_syncsplash(HZ, str(LANG_TAGCACHE_BUSY)); return false; } #endif - gui_syncsplash(0, true, str(LANG_SHUTTINGDOWN)); + gui_syncsplash(0, str(LANG_SHUTTINGDOWN)); } if (global_settings.fade_on_stop diff --git a/apps/onplay.c b/apps/onplay.c index a0da3ac2d9..be9f2d0703 100644 --- a/apps/onplay.c +++ b/apps/onplay.c @@ -141,7 +141,7 @@ static bool list_viewers(void) else { /* FIX: translation! */ - gui_syncsplash(HZ*2, true, (unsigned char *)"No viewers found"); + gui_syncsplash(HZ*2, (unsigned char *)"No viewers found"); } if (ret == PLUGIN_USB_CONNECTED) @@ -173,7 +173,7 @@ static bool add_to_playlist(int position, bool queue) }; struct text_message message={lines, 2}; - gui_syncsplash(0, true, str(LANG_WAIT)); + gui_syncsplash(0, str(LANG_WAIT)); if (new_playlist) playlist_create(NULL, NULL); @@ -454,7 +454,7 @@ static int remove_dir(char* dirname, int len) #endif if(ACTION_STD_CANCEL == get_action(CONTEXT_STD,TIMEOUT_NOBLOCK)) { - gui_syncsplash(HZ, true, str(LANG_MENU_SETTING_CANCEL)); + gui_syncsplash(HZ, str(LANG_MENU_SETTING_CANCEL)); result = -1; break; } @@ -522,12 +522,12 @@ static bool set_backdrop(void) { /* load the image */ if(load_main_backdrop(selected_file)) { - gui_syncsplash(HZ, true, str(LANG_BACKDROP_LOADED)); + gui_syncsplash(HZ, str(LANG_BACKDROP_LOADED)); set_file(selected_file, (char *)global_settings.backdrop_file, MAX_FILENAME); show_main_backdrop(); return true; } else { - gui_syncsplash(HZ, true, str(LANG_BACKDROP_FAILED)); + gui_syncsplash(HZ, str(LANG_BACKDROP_FAILED)); return false; } } @@ -575,7 +575,7 @@ static bool create_dir(void) rc = mkdir(dirname); if (rc < 0) { - gui_syncsplash(HZ, true, (unsigned char *)"%s %s", + gui_syncsplash(HZ, (unsigned char *)"%s %s", str(LANG_CREATE_DIR), str(LANG_FAILED)); } else { onplay_result = ONPLAY_RELOAD_DIR; @@ -849,7 +849,7 @@ static bool clipboard_paste(void) /* Force reload of the current directory */ onplay_result = ONPLAY_RELOAD_DIR; } else { - gui_syncsplash(HZ, true, (unsigned char *)"%s %s", + gui_syncsplash(HZ, (unsigned char *)"%s %s", str(LANG_PASTE), str(LANG_FAILED)); } diff --git a/apps/playback.c b/apps/playback.c index 0680c5f453..9676a107d0 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -820,7 +820,7 @@ void audio_set_crossfade(int enable) offset = CUR_TI->id3.offset; /* Playback has to be stopped before changing the buffer size. */ - gui_syncsplash(0, true, (char *)str(LANG_RESTARTING_PLAYBACK)); + gui_syncsplash(0, (char *)str(LANG_RESTARTING_PLAYBACK)); audio_stop(); } @@ -2006,7 +2006,7 @@ static void codec_thread(void) if (!ci.new_track) { logf("Codec failure"); - gui_syncsplash(HZ*2, true, "Codec failure"); + gui_syncsplash(HZ*2, "Codec failure"); } if (!codec_load_next_track()) @@ -2060,7 +2060,7 @@ static void codec_thread(void) break; logf("Encoder failure"); - gui_syncsplash(HZ*2, true, "Encoder failure"); + gui_syncsplash(HZ*2, "Encoder failure"); if (ci.enc_codec_loaded < 0) break; @@ -2742,7 +2742,7 @@ static bool audio_load_track(int offset, bool start_play, bool rebuffer) * the codec file failed part way through, either way, skip the track */ snprintf(msgbuf, sizeof(msgbuf)-1, "No codec for: %s", trackname); /* We should not use gui_syncplash from audio thread! */ - gui_syncsplash(HZ*2, true, msgbuf); + gui_syncsplash(HZ*2, msgbuf); /* Skip invalid entry from playlist. */ playlist_skip_entry(NULL, last_peek_offset); tracks[track_widx].taginfo_ready = false; diff --git a/apps/playlist.c b/apps/playlist.c index 0358b6adc4..9d88e210f8 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -288,7 +288,7 @@ static void create_control(struct playlist_info* playlist) { if (check_rockboxdir()) { - gui_syncsplash(HZ*2, true, (unsigned char *)"%s (%d)", + gui_syncsplash(HZ*2, (unsigned char *)"%s (%d)", str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR), playlist->control_fd); } @@ -484,7 +484,7 @@ static int add_indices_to_playlist(struct playlist_info* playlist, lcd_setmargins(0, 0); #endif - gui_syncsplash(0, true, str(LANG_PLAYLIST_LOAD)); + gui_syncsplash(0, str(LANG_PLAYLIST_LOAD)); if (!buffer) { @@ -1348,9 +1348,9 @@ static int get_filename(struct playlist_info* playlist, int index, int seek, if (max < 0) { if (control_file) - gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); else - gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_ACCESS_ERROR)); + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_ACCESS_ERROR)); return max; } @@ -1440,7 +1440,7 @@ static int get_next_dir(char *dir, bool is_forward, bool recursion) if (ft_load(tc, (dir[0]=='\0')?"/":dir) < 0) { - gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR)); + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR)); exit = true; result = -1; break; @@ -1525,7 +1525,7 @@ static int check_subdir_for_music(char *dir, char *subdir) if (ft_load(tc, dir) < 0) { - gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR)); + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR)); return -2; } @@ -1578,7 +1578,7 @@ static int check_subdir_for_music(char *dir, char *subdir) /* we now need to reload our current directory */ if(ft_load(tc, dir) < 0) - gui_syncsplash(HZ*2, true, + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR)); } @@ -1663,7 +1663,7 @@ static void display_playlist_count(int count, const unsigned char *fmt) lcd_setmargins(0, 0); #endif - gui_syncsplash(0, true, fmt, count, + gui_syncsplash(0, fmt, count, #if CONFIG_KEYPAD == PLAYER_PAD str(LANG_STOP_ABORT) #else @@ -1677,7 +1677,7 @@ static void display_playlist_count(int count, const unsigned char *fmt) */ static void display_buffer_full(void) { - gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_BUFFER_FULL)); + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_BUFFER_FULL)); } /* @@ -1756,7 +1756,7 @@ static int flush_cached_control(struct playlist_info* playlist) else { result = -1; - gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR)); + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR)); } return result; @@ -1943,11 +1943,11 @@ int playlist_resume(void) empty_playlist(playlist, true); - gui_syncsplash(0, true, str(LANG_WAIT)); + gui_syncsplash(0, str(LANG_WAIT)); playlist->control_fd = open(playlist->control_filename, O_RDWR); if (playlist->control_fd < 0) { - gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); return -1; } playlist->control_created = true; @@ -1955,7 +1955,7 @@ int playlist_resume(void) control_file_size = filesize(playlist->control_fd); if (control_file_size <= 0) { - gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); return -1; } @@ -1964,7 +1964,7 @@ int playlist_resume(void) PLAYLIST_COMMAND_SIZE HZ/4) { - gui_syncsplash(0, true, str(LANG_LOADING_PERCENT), + gui_syncsplash(0, str(LANG_LOADING_PERCENT), (total_read+count)*100/control_file_size, #if CONFIG_KEYPAD == PLAYER_PAD str(LANG_STOP_ABORT) @@ -2264,7 +2264,7 @@ int playlist_resume(void) if (result < 0) { - gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_INVALID)); + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_INVALID)); return result; } @@ -2273,7 +2273,7 @@ int playlist_resume(void) if ((total_read + count) >= control_file_size) { /* no newline at end of control file */ - gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_INVALID)); + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_INVALID)); return -1; } @@ -2367,7 +2367,7 @@ int playlist_shuffle(int random_seed, int start_index) start_current = true; } - gui_syncsplash(0, true, str(LANG_PLAYLIST_SHUFFLE)); + gui_syncsplash(0, str(LANG_PLAYLIST_SHUFFLE)); randomise_playlist(playlist, random_seed, start_current, true); @@ -2859,7 +2859,7 @@ int playlist_insert_track(struct playlist_info* playlist, const char *filename, if (check_control(playlist) < 0) { - gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); return -1; } @@ -2890,7 +2890,7 @@ int playlist_insert_directory(struct playlist_info* playlist, if (check_control(playlist) < 0) { - gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); return -1; } @@ -2956,14 +2956,14 @@ int playlist_insert_playlist(struct playlist_info* playlist, char *filename, if (check_control(playlist) < 0) { - gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); return -1; } fd = open(filename, O_RDONLY); if (fd < 0) { - gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_ACCESS_ERROR)); + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_ACCESS_ERROR)); return -1; } @@ -3076,7 +3076,7 @@ int playlist_delete(struct playlist_info* playlist, int index) if (check_control(playlist) < 0) { - gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); return -1; } @@ -3111,7 +3111,7 @@ int playlist_move(struct playlist_info* playlist, int index, int new_index) if (check_control(playlist) < 0) { - gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); return -1; } @@ -3374,7 +3374,7 @@ int playlist_save(struct playlist_info* playlist, char *filename) if (playlist->buffer_size < (int)(playlist->amount * sizeof(int))) { /* not enough buffer space to store updated indices */ - gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_ACCESS_ERROR)); + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_ACCESS_ERROR)); return -1; } @@ -3390,7 +3390,7 @@ int playlist_save(struct playlist_info* playlist, char *filename) fd = open(path, O_CREAT|O_WRONLY|O_TRUNC); if (fd < 0) { - gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_ACCESS_ERROR)); + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_ACCESS_ERROR)); return -1; } @@ -3431,7 +3431,7 @@ int playlist_save(struct playlist_info* playlist, char *filename) if (fdprintf(fd, "%s\n", tmp_buf) < 0) { - gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_ACCESS_ERROR)); + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_ACCESS_ERROR)); result = -1; break; } @@ -3518,7 +3518,7 @@ int playlist_directory_tracksearch(const char* dirname, bool recurse, if (ft_load(tc, dirname) < 0) { - gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR)); + gui_syncsplash(HZ*2, str(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR)); *(tc->dirfilter) = old_dirfilter; return -1; } diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c index d0602991e4..1e3d523181 100644 --- a/apps/playlist_catalog.c +++ b/apps/playlist_catalog.c @@ -112,7 +112,7 @@ static int initialize_catalog(void) if (!playlist_dir_exists) { if (mkdir(playlist_dir) < 0) { - gui_syncsplash(HZ*2, true, str(LANG_CATALOG_NO_DIRECTORY), + gui_syncsplash(HZ*2, str(LANG_CATALOG_NO_DIRECTORY), playlist_dir); return -1; } @@ -146,7 +146,7 @@ static int create_playlist_list(char** playlists, int num_items, if (ft_load(tc, playlist_dir) < 0) { - gui_syncsplash(HZ*2, true, str(LANG_CATALOG_NO_DIRECTORY), + gui_syncsplash(HZ*2, str(LANG_CATALOG_NO_DIRECTORY), playlist_dir); goto exit; } @@ -231,7 +231,7 @@ static int display_playlists(char* playlist, bool view) if (num_playlists <= 0) { - gui_syncsplash(HZ*2, true, str(LANG_CATALOG_NO_PLAYLISTS)); + gui_syncsplash(HZ*2, str(LANG_CATALOG_NO_PLAYLISTS)); return -1; } @@ -319,7 +319,7 @@ static int display_playlists(char* playlist, bool view) insert */ static void display_insert_count(int count) { - gui_syncsplash(0, true, str(LANG_PLAYLIST_INSERT_COUNT), count, + gui_syncsplash(0, str(LANG_PLAYLIST_INSERT_COUNT), count, #if CONFIG_KEYPAD == PLAYER_PAD str(LANG_STOP_ABORT) #else diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index 0b77386de0..3336645520 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c @@ -636,9 +636,9 @@ bool playlist_viewer_ex(char* filename) { /* Play has stopped */ #ifdef HAVE_LCD_CHARCELLS - gui_syncsplash(HZ, true, str(LANG_END_PLAYLIST_PLAYER)); + gui_syncsplash(HZ, str(LANG_END_PLAYLIST_PLAYER)); #else - gui_syncsplash(HZ, true, str(LANG_END_PLAYLIST_RECORDER)); + gui_syncsplash(HZ, str(LANG_END_PLAYLIST_RECORDER)); #endif goto exit; } @@ -696,7 +696,7 @@ bool playlist_viewer_ex(char* filename) ret = playlist_move(viewer.playlist, viewer.move_track, current_track->index); if (ret < 0) - gui_syncsplash(HZ, true, str(LANG_MOVE_FAILED)); + gui_syncsplash(HZ, str(LANG_MOVE_FAILED)); update_playlist(true); viewer.move_track = -1; @@ -819,7 +819,7 @@ bool search_playlist(void) playlist_count = playlist_amount_ex(viewer.playlist); for (i=0;(imagic != PLUGIN_MAGIC || hdr->target_id != TARGET_ID) { sim_plugin_close(pd); - gui_syncsplash(HZ*2, true, str(LANG_PLUGIN_WRONG_MODEL)); + gui_syncsplash(HZ*2, str(LANG_PLUGIN_WRONG_MODEL)); return -1; } if (hdr->api_version > PLUGIN_API_VERSION || hdr->api_version < PLUGIN_MIN_API_VERSION) { sim_plugin_close(pd); - gui_syncsplash(HZ*2, true, str(LANG_PLUGIN_WRONG_VERSION)); + gui_syncsplash(HZ*2, str(LANG_PLUGIN_WRONG_VERSION)); return -1; } #else fd = open(plugin, O_RDONLY); if (fd < 0) { - gui_syncsplash(HZ*2, true, str(LANG_PLUGIN_CANT_OPEN), plugin); + gui_syncsplash(HZ*2, str(LANG_PLUGIN_CANT_OPEN), plugin); return fd; } @@ -559,7 +559,7 @@ int plugin_load(const char* plugin, void* parameter) close(fd); if (readsize < 0) { - gui_syncsplash(HZ*2, true, str(LANG_READ_FAILED), plugin); + gui_syncsplash(HZ*2, str(LANG_READ_FAILED), plugin); return -1; } hdr = (struct plugin_header *)pluginbuf; @@ -569,12 +569,12 @@ int plugin_load(const char* plugin, void* parameter) || hdr->target_id != TARGET_ID || hdr->load_addr != pluginbuf || hdr->end_addr > pluginbuf + PLUGIN_BUFFER_SIZE) { - gui_syncsplash(HZ*2, true, str(LANG_PLUGIN_WRONG_MODEL)); + gui_syncsplash(HZ*2, str(LANG_PLUGIN_WRONG_MODEL)); return -1; } if (hdr->api_version > PLUGIN_API_VERSION || hdr->api_version < PLUGIN_MIN_API_VERSION) { - gui_syncsplash(HZ*2, true, str(LANG_PLUGIN_WRONG_VERSION)); + gui_syncsplash(HZ*2, str(LANG_PLUGIN_WRONG_VERSION)); return -1; } plugin_size = hdr->end_addr - pluginbuf; @@ -659,7 +659,7 @@ int plugin_load(const char* plugin, void* parameter) return PLUGIN_USB_CONNECTED; default: - gui_syncsplash(HZ*2, true, str(LANG_PLUGIN_ERROR)); + gui_syncsplash(HZ*2, str(LANG_PLUGIN_ERROR)); break; } return PLUGIN_OK; diff --git a/apps/plugin.h b/apps/plugin.h index e16959681c..c0e04a2068 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -205,7 +205,7 @@ struct plugin_api { void (*backlight_on)(void); void (*backlight_off)(void); void (*backlight_set_timeout)(int index); - void (*splash)(int ticks, bool center, const unsigned char *fmt, ...); + void (*splash)(int ticks, const unsigned char *fmt, ...); #ifdef HAVE_REMOTE_LCD /* remote lcd */ diff --git a/apps/plugins/alpine_cdc.c b/apps/plugins/alpine_cdc.c index 9cc1f9cde4..4fa2e36f54 100644 --- a/apps/plugins/alpine_cdc.c +++ b/apps/plugins/alpine_cdc.c @@ -1151,7 +1151,7 @@ int main(void* parameter) mbus_init(); /* init the M-Bus layer */ emu_init(); /* init emulator */ - rb->splash(HZ/5, true, "Alpine CDC"); /* be quick on autostart */ + rb->splash(HZ/5, "Alpine CDC"); /* be quick on autostart */ #ifdef DEBUG print_scroll("Alpine M-Bus Test"); @@ -1164,7 +1164,7 @@ int main(void* parameter) stacksize = (stacksize - 100) & ~3; if (stacksize < DEFAULT_STACK_SIZE) { - rb->splash(HZ*2, true, "Out of memory"); + rb->splash(HZ*2, "Out of memory"); return -1; } diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c index 6e3178237f..b82fdef965 100644 --- a/apps/plugins/battery_bench.c +++ b/apps/plugins/battery_bench.c @@ -320,7 +320,7 @@ void thread(void) if(exit) { if(exit == 2) - rb->splash(HZ,true, + rb->splash(HZ, #ifdef HAVE_LCD_BITMAP "Exiting battery_bench..."); #else @@ -464,7 +464,7 @@ int main(void) } else { - rb->splash(HZ / 2, true, "Cannot create file!"); + rb->splash(HZ / 2, "Cannot create file!"); return PLUGIN_ERROR; } } @@ -482,7 +482,7 @@ int main(void) IF_PRIO(, PRIORITY_BACKGROUND) IF_COP(, CPU, false)) == NULL) { - rb->splash(HZ,true,"Cannot create thread!"); + rb->splash(HZ, "Cannot create thread!"); return PLUGIN_ERROR; } diff --git a/apps/plugins/blackjack.c b/apps/plugins/blackjack.c index 728924da3e..81ac65d142 100644 --- a/apps/plugins/blackjack.c +++ b/apps/plugins/blackjack.c @@ -712,7 +712,7 @@ static void blackjack_savegame(struct game_context* bj) { static void blackjack_callback(void* param) { struct game_context* bj = (struct game_context*) param; if(bj->dirty) { - rb->splash(HZ, true, "Saving high scores..."); + rb->splash(HZ, "Saving high scores..."); blackjack_savescores(bj); } } @@ -1124,9 +1124,9 @@ static unsigned int blackjack_menu(struct game_context* bj) { case BJACK_RESUME:/* resume game */ if(!blackjack_loadgame(bj)) { - rb->splash(HZ*2, true, "Nothing to resume"); + rb->splash(HZ*2, "Nothing to resume"); } else { - rb->splash(HZ*2, true, "Loading..."); + rb->splash(HZ*2, "Loading..."); breakout = true; } break; @@ -1218,7 +1218,7 @@ static int blackjack(struct game_context* bj) { !bj->asked_insurance) { temp_var = insurance(bj); if (bj->dealer_total == 21) { - rb->splash(HZ, true, "Dealer has blackjack"); + rb->splash(HZ, "Dealer has blackjack"); bj->player_money += temp_var; bj->end_hand = true; breakout = true; @@ -1226,7 +1226,7 @@ static int blackjack(struct game_context* bj) { finish_game(bj); } else { - rb->splash(HZ, true, "Dealer does not have blackjack"); + rb->splash(HZ, "Dealer does not have blackjack"); bj->player_money -= temp_var; breakout = true; redraw_board(bj); @@ -1285,13 +1285,13 @@ static int blackjack(struct game_context* bj) { } } else if((signed int)bj->current_bet * 2 > bj->player_money) { - rb->splash(HZ, true, "Not enough money to double down."); + rb->splash(HZ, "Not enough money to double down."); redraw_board(bj); rb->lcd_update(); } break; case BJACK_RESUME: /* save and end game */ - rb->splash(HZ, true, "Saving game..."); + rb->splash(HZ, "Saving game..."); blackjack_savegame(bj); /* fall through to BJACK_QUIT */ @@ -1412,14 +1412,14 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { while(!exit) { switch(blackjack(&bj)){ case BJ_LOSE: - rb->splash(HZ, true, "Not enough money to continue"); + rb->splash(HZ, "Not enough money to continue"); /* fall through to BJ_END */ case BJ_END: if(!bj.resume) { if((position = blackjack_recordscore(&bj))) { rb->snprintf(str, 19, "New high score #%d!", position); - rb->splash(HZ*2, true, str); + rb->splash(HZ*2, str); } } break; @@ -1430,7 +1430,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { case BJ_QUIT: if(bj.dirty) { - rb->splash(HZ, true, "Saving high scores..."); + rb->splash(HZ, "Saving high scores..."); blackjack_savescores(&bj); } exit = true; diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index c88ee77cd0..2f1696f08a 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c @@ -1804,7 +1804,7 @@ int game_loop(void) if (score>highscore) { sleep(2); highscore=score; - rb->splash(HZ*2,true,"New High Score"); + rb->splash(HZ*2, "New High Score"); } else { sleep(3); @@ -1960,7 +1960,7 @@ int game_loop(void) } else { #if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64) - rb->splash(HZ*2,true,"Game Over"); + rb->splash(HZ*2, "Game Over"); #else rb->lcd_bitmap(brickmania_gameover,LCD_WIDTH/2-55,LCD_HEIGHT-87, 110,52); @@ -1969,7 +1969,7 @@ int game_loop(void) if (score>highscore) { sleep(2); highscore=score; - rb->splash(HZ*2,true,"New High Score"); + rb->splash(HZ*2, "New High Score"); } else { sleep(3); } diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c index 1f5b319e72..bc862baeda 100644 --- a/apps/plugins/bubbles.c +++ b/apps/plugins/bubbles.c @@ -2164,7 +2164,7 @@ static int bubbles_checklevel(struct game_context* bb) { } rb->snprintf(str, 12, "%d points", points); - rb->splash(HZ, true, str); + rb->splash(HZ, str); /* advance to the next level */ if(!bubbles_nextlevel(bb)) { @@ -2174,7 +2174,7 @@ static int bubbles_checklevel(struct game_context* bb) { bubbles_drawboard(bb); rb->lcd_update(); rb->snprintf(str, 12, "Level %d", bb->level); - rb->splash(HZ, true, str); + rb->splash(HZ, str); bubbles_drawboard(bb); rb->lcd_update(); @@ -2334,7 +2334,7 @@ static inline void bubbles_setcolors(void) { static void bubbles_callback(void* param) { struct game_context* bb = (struct game_context*) param; if(bb->dirty) { - rb->splash(HZ/2, true, "Saving high scores..."); + rb->splash(HZ/2, "Saving high scores..."); bubbles_savescores(bb); } } @@ -2385,7 +2385,7 @@ static int bubbles_handlebuttons(struct game_context* bb, bool animblock, case BUBBLES_START: /* pause the game */ start = *rb->current_tick; - rb->splash(1, true, "Paused"); + rb->splash(1, "Paused"); while(pluginlib_getaction(rb,TIMEOUT_BLOCK,plugin_contexts,2) != (BUBBLES_START)); bb->startedshot += *rb->current_tick-start; @@ -2395,7 +2395,7 @@ static int bubbles_handlebuttons(struct game_context* bb, bool animblock, case BUBBLES_RESUME: /* save and end the game */ if(!animblock) { - rb->splash(HZ/2, true, "Saving game..."); + rb->splash(HZ/2, "Saving game..."); bubbles_savegame(bb); return BB_END; } @@ -2554,7 +2554,7 @@ static int bubbles(struct game_context* bb) { case BUBBLES_RESUME: /* resume game */ if(!bubbles_loadgame(bb)) { - rb->splash(HZ*2, true, "Nothing to resume"); + rb->splash(HZ*2, "Nothing to resume"); } else { startgame = true; } @@ -2652,7 +2652,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { xlcd_init(rb); /* load files */ - rb->splash(0, true, "Loading..."); + rb->splash(0, "Loading..."); bubbles_loadscores(&bb); rb->lcd_clear_display(); @@ -2666,7 +2666,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { switch(bubbles(&bb)){ char str[19]; case BB_WIN: - rb->splash(HZ*2, true, "You Win!"); + rb->splash(HZ*2, "You Win!"); /* record high level */ if( NUM_LEVELS-1 > bb.highlevel) { bb.highlevel = NUM_LEVELS-1; @@ -2676,12 +2676,12 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { /* record high score */ if((position = bubbles_recordscore(&bb))) { rb->snprintf(str, 19, "New high score #%d!", position); - rb->splash(HZ*2, true, str); + rb->splash(HZ*2, str); } break; case BB_LOSE: - rb->splash(HZ*2, true, "Game Over"); + rb->splash(HZ*2, "Game Over"); /* fall through to BB_END */ case BB_END: @@ -2695,7 +2695,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { /* record high score */ if((position = bubbles_recordscore(&bb))) { rb->snprintf(str, 19, "New high score #%d!", position); - rb->splash(HZ*2, true, str); + rb->splash(HZ*2, str); } } break; @@ -2706,7 +2706,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { case BB_QUIT: if(bb.dirty) { - rb->splash(HZ/2, true, "Saving high scores..."); + rb->splash(HZ/2, "Saving high scores..."); bubbles_savescores(&bb); } exit = true; diff --git a/apps/plugins/calculator.c b/apps/plugins/calculator.c index 108b17c9e8..2a8f8ffe45 100644 --- a/apps/plugins/calculator.c +++ b/apps/plugins/calculator.c @@ -1017,7 +1017,7 @@ void printResult(void) switch(calStatus){ case cal_exit: rb->lcd_clear_display(); - rb->splash(HZ/3, true, "Bye now!"); + rb->splash(HZ/3, "Bye now!"); break; case cal_error: clearbuf(); @@ -1447,7 +1447,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) lastbtn = btn; } /* while (calStatus != cal_exit ) */ - /* rb->splash(HZ*2, true, "Hello world!"); */ + /* rb->splash(HZ*2, "Hello world!"); */ rb->button_clear_queue(); return PLUGIN_OK; } diff --git a/apps/plugins/chessbox/chessbox.c b/apps/plugins/chessbox/chessbox.c index c6a79e4ec7..da26d0f6db 100644 --- a/apps/plugins/chessbox/chessbox.c +++ b/apps/plugins/chessbox/chessbox.c @@ -384,7 +384,7 @@ void cb_levelup ( void ) { cb_setlevel ( 1 ); else cb_setlevel ( Level+1 ); - rb->splash ( 50 , true , level_string[Level-1] ); + rb->splash ( 50 , level_string[Level-1] ); }; /* ---- Save current position ---- */ @@ -393,7 +393,7 @@ void cb_saveposition ( void ) { short sq,i,c; unsigned short temp; - rb->splash ( 0 , true , "Saving position" ); + rb->splash ( 0 , "Saving position" ); fd = rb->open(SAVE_FILE, O_WRONLY|O_CREAT); @@ -448,7 +448,7 @@ void cb_restoreposition ( void ) { unsigned short m; if ( (fd = rb->open(SAVE_FILE, O_RDONLY)) >= 0 ) { - rb->splash ( 0 , true , "Loading position" ); + rb->splash ( 0 , "Loading position" ); rb->read(fd, &(computer), sizeof(computer)); rb->read(fd, &(opponent), sizeof(opponent)); rb->read(fd, &(Game50), sizeof(Game50)); @@ -673,7 +673,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { while (!exit) { if ( mate ) { - rb->splash ( 500 , true , "Checkmate!" ); + rb->splash ( 500 , "Checkmate!" ); rb->button_get(true); GNUChess_Initialize(); cb_drawboard(); @@ -682,11 +682,11 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { switch (command.type) { case COMMAND_MOVE: if ( ! VerifyMove ( command.mv_s , 0 , &command.mv ) ) { - rb->splash ( 50 , true , "Illegal move!" ); + rb->splash ( 50 , "Illegal move!" ); cb_drawboard(); } else { cb_drawboard(); - rb->splash ( 0 , true , "Thinking..." ); + rb->splash ( 0 , "Thinking..." ); #ifdef HAVE_ADJUSTABLE_CPU_FREQ rb->cpu_boost ( true ); #endif @@ -709,7 +709,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { #endif case COMMAND_PLAY: opponent = !opponent; computer = !computer; - rb->splash ( 0 , true , "Thinking..." ); + rb->splash ( 0 , "Thinking..." ); #ifdef HAVE_ADJUSTABLE_CPU_FREQ rb->cpu_boost ( true ); #endif diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c index 5269e454f1..bb4045249a 100644 --- a/apps/plugins/chessclock.c +++ b/apps/plugins/chessclock.c @@ -196,7 +196,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->memset(&settings, 0, sizeof(settings)); /* now go ahead and have fun! */ - rb->splash(HZ, true, "Chess Clock"); + rb->splash(HZ, "Chess Clock"); rb->lcd_clear_display(); i=0; diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c index 44cc58c9d5..6e54669ef0 100644 --- a/apps/plugins/chip8.c +++ b/apps/plugins/chip8.c @@ -1295,7 +1295,7 @@ bool chip8_run(char* file) chip8(); if (!ok) { - rb->splash(HZ, true, "Error"); + rb->splash(HZ, "Error"); return false; } @@ -1308,7 +1308,7 @@ bool chip8_run(char* file) if (chip8_running == 3) { /* unsupported instruction */ - rb->splash(HZ, true, "Error: Unsupported" + rb->splash(HZ, "Error: Unsupported" #ifndef CHIP8_SUPER " CHIP-8 instruction. (maybe S-CHIP)" #else @@ -1332,7 +1332,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) if (parameter == NULL) { - rb->splash(HZ, true, "Play a .ch8 file!"); + rb->splash(HZ, "Play a .ch8 file!"); return PLUGIN_ERROR; } else diff --git a/apps/plugins/chopper.c b/apps/plugins/chopper.c index 941f139414..1efe202946 100644 --- a/apps/plugins/chopper.c +++ b/apps/plugins/chopper.c @@ -484,17 +484,17 @@ static void chopKillPlayer(void) #if LCD_DEPTH >= 2 rb->lcd_set_foreground(LCD_LIGHTGRAY); #endif - rb->splash(HZ, true, "Game Over"); + rb->splash(HZ, "Game Over"); if (score > highscore) { char scoretext[30]; highscore = score; rb->snprintf(scoretext, sizeof(scoretext), "New High Score: %d", highscore); - rb->splash(HZ*2, true, scoretext); + rb->splash(HZ*2, scoretext); } - rb->splash(HZ/4, true, "Press " ACTIONTEXT " to continue"); + rb->splash(HZ/4, "Press " ACTIONTEXT " to continue"); rb->lcd_update(); rb->lcd_set_drawmode(DRMODE_SOLID); @@ -668,7 +668,7 @@ static int chopMenu(int menunum) menu_quit=true; res = -1; } else if(menunum==0){ - rb->splash(HZ, true, "No game to resume"); + rb->splash(HZ, "No game to resume"); } break; case 2: diff --git a/apps/plugins/clock.c b/apps/plugins/clock.c index 010e293bac..dfc5fd7163 100644 --- a/apps/plugins/clock.c +++ b/apps/plugins/clock.c @@ -1418,10 +1418,10 @@ void confirm_reset(void) if(result == 1) /* reset! */ { reset_settings(); - rb->splash(HZ, true, "Settings reset!"); + rb->splash(HZ, "Settings reset!"); } else - rb->splash(HZ, true, "Settings NOT reset."); + rb->splash(HZ, "Settings NOT reset."); } /************************************ @@ -1449,7 +1449,7 @@ void general_settings(void) case 1: save_settings(false); - rb->splash(HZ, true, "Settings saved"); + rb->splash(HZ, "Settings saved"); break; case 2: diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c index 57f1015368..526400db61 100644 --- a/apps/plugins/cube.c +++ b/apps/plugins/cube.c @@ -580,7 +580,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) if (gray_init(rb, gbuf, gbuf_size, true, LCD_WIDTH, LCD_HEIGHT, 3, 0, NULL) != 3) { - rb->splash(HZ, true, "Couldn't get grayscale buffer"); + rb->splash(HZ, "Couldn't get grayscale buffer"); return PLUGIN_ERROR; } /* init lcd_ function pointers */ @@ -595,7 +595,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) #else /* LCD_CHARCELLS */ if (!pgfx_init(rb, 4, 2)) { - rb->splash(HZ*2, true, "Old LCD :("); + rb->splash(HZ*2, "Old LCD :("); return PLUGIN_OK; } pgfx_display(3, 0); diff --git a/apps/plugins/dict.c b/apps/plugins/dict.c index 1a0cbaab5b..4e5066af79 100644 --- a/apps/plugins/dict.c +++ b/apps/plugins/dict.c @@ -172,7 +172,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) if (fIndex < 0) { DEBUGF("Err: Failed to open index file.\n"); - rb->splash(HZ*2, true, "Failed to open index."); + rb->splash(HZ*2, "Failed to open index."); return PLUGIN_ERROR; } @@ -212,7 +212,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) if (low == -1 || rb->strcasecmp(searchword, word.word) != 0) { DEBUGF("Not found.\n"); - rb->splash(HZ*2, true, "Not found."); + rb->splash(HZ*2, "Not found."); rb->close(fIndex); return PLUGIN_OK; } @@ -224,7 +224,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) if (fData < 0) { DEBUGF("Err: Failed to open description file.\n"); - rb->splash(HZ*2, true, "Failed to open descriptions."); + rb->splash(HZ*2, "Failed to open descriptions."); rb->close(fIndex); return PLUGIN_ERROR; } diff --git a/apps/plugins/disktidy.c b/apps/plugins/disktidy.c index d9df6ffd5f..651ed5f3ba 100644 --- a/apps/plugins/disktidy.c +++ b/apps/plugins/disktidy.c @@ -330,10 +330,10 @@ enum plugin_status tidy_do(enum tidy_system system) rb->snprintf(text, 24, "Cleaned up %d items", removed); if (status == TIDY_RETURN_ABORT) { - rb->splash(HZ, true, "User aborted"); + rb->splash(HZ, "User aborted"); rb->lcd_clear_display(); } - rb->splash(HZ*2, true, text); + rb->splash(HZ*2, text); } return status; } diff --git a/apps/plugins/doom/rockdoom.c b/apps/plugins/doom/rockdoom.c index 305eeafd03..1081324974 100644 --- a/apps/plugins/doom/rockdoom.c +++ b/apps/plugins/doom/rockdoom.c @@ -610,7 +610,7 @@ int doom_menu() if( (status=Dbuild_base(names)) == 0 ) // Build up the base wad files (select last added file) { - rb->splash(HZ*2, true, "Missing Base WAD!"); + rb->splash(HZ*2, "Missing Base WAD!"); return -2; } @@ -694,7 +694,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) printf ("M_LoadDefaults: Load system defaults.\n"); M_LoadDefaults (); // load before initing other systems - rb->splash(HZ*2, true, "Welcome to RockDoom"); + rb->splash(HZ*2, "Welcome to RockDoom"); myargv =0; myargc=0; diff --git a/apps/plugins/doom/v_video.c b/apps/plugins/doom/v_video.c index 167316beae..a7e2baea16 100644 --- a/apps/plugins/doom/v_video.c +++ b/apps/plugins/doom/v_video.c @@ -431,7 +431,7 @@ void V_DrawMemPatch(int x, int y, int scrn, const patch_t *patch, || y<0 || y+SHORT(patch->height) > ((flags & VPT_STRETCH) ? 200 : SCREENHEIGHT)) { - rb->splash(HZ*2, true, "This wad does not follow standard doom graphics!"); + rb->splash(HZ*2, "This wad does not follow standard doom graphics!"); // killough 1/19/98: improved error message: I_Error("V_DrawMemPatch: Patch (%d,%d)-(%d,%d) exceeds LFB Bad V_DrawMemPatch (flags=%u)", x, y, x+SHORT(patch->width), y+SHORT(patch->height), flags); diff --git a/apps/plugins/fire.c b/apps/plugins/fire.c index 2e762cb9e9..c293bf7af6 100644 --- a/apps/plugins/fire.c +++ b/apps/plugins/fire.c @@ -352,7 +352,7 @@ int main(void) 32, 1<<8, NULL) + 1; if(shades <= 1) { - rb->splash(HZ, true, "not enough memory"); + rb->splash(HZ, "not enough memory"); return PLUGIN_ERROR; } /* switch on grayscale overlay */ diff --git a/apps/plugins/firmware_flash.c b/apps/plugins/firmware_flash.c index 1fc6b07a89..073667e73f 100644 --- a/apps/plugins/firmware_flash.c +++ b/apps/plugins/firmware_flash.c @@ -647,21 +647,21 @@ void DoUserDialog(char* filename) /* this can only work if Rockbox runs in DRAM, not flash ROM */ if ((UINT8*)rb >= FB && (UINT8*)rb < FB + 4096*1024) /* 4 MB max */ { /* we're running from flash */ - rb->splash(HZ*3, true, "Not from ROM"); + rb->splash(HZ*3, "Not from ROM"); return; /* exit */ } /* test if the user is running the correct plugin for this box */ if (!CheckPlatform(PLATFORM_ID, *(UINT16*)(FB + VERSION_ADR))) { - rb->splash(HZ*3, true, "Wrong plugin"); + rb->splash(HZ*3, "Wrong plugin"); return; /* exit */ } /* refuse to work if the power may fail meanwhile */ if (!rb->battery_level_safe()) { - rb->splash(HZ*3, true, "Battery too low!"); + rb->splash(HZ*3, "Battery too low!"); return; /* exit */ } @@ -669,7 +669,7 @@ void DoUserDialog(char* filename) result = CheckBootROM(); if (result == eUnknown) { /* no support for any other yet */ - rb->splash(HZ*3, true, "Wrong boot ROM"); + rb->splash(HZ*3, "Wrong boot ROM"); return; /* exit */ } is_romless = (result == eROMless); @@ -690,7 +690,7 @@ void DoUserDialog(char* filename) sector = rb->plugin_get_buffer(&memleft); if (memleft < SEC_SIZE) /* need buffer for a flash sector */ { - rb->splash(HZ*3, true, "Out of memory"); + rb->splash(HZ*3, "Out of memory"); return; /* exit */ } @@ -700,7 +700,7 @@ void DoUserDialog(char* filename) ShowFlashInfo(&FlashInfo); if (FlashInfo.size == 0) /* no valid chip */ { - rb->splash(HZ*3, true, "Sorry!"); + rb->splash(HZ*3, "Sorry!"); return; /* exit */ } @@ -884,21 +884,21 @@ void DoUserDialog(char* filename) /* this can only work if Rockbox runs in DRAM, not flash ROM */ if ((UINT8*)rb >= FB && (UINT8*)rb < FB + 4096*1024) /* 4 MB max */ { /* we're running from flash */ - rb->splash(HZ*3, true, "Not from ROM"); + rb->splash(HZ*3, "Not from ROM"); return; /* exit */ } /* test if the user is running the correct plugin for this box */ if (!CheckPlatform(PLATFORM_ID, *(UINT16*)(FB + VERSION_ADR))) { - rb->splash(HZ*3, true, "Wrong version"); + rb->splash(HZ*3, "Wrong version"); return; /* exit */ } /* refuse to work if the power may fail meanwhile */ if (!rb->battery_level_safe()) { - rb->splash(HZ*3, true, "Batt. too low!"); + rb->splash(HZ*3, "Batt. too low!"); return; /* exit */ } @@ -906,7 +906,7 @@ void DoUserDialog(char* filename) result = CheckBootROM(); if (result == eUnknown) { /* no support for any other yet */ - rb->splash(HZ*3, true, "Wrong boot ROM"); + rb->splash(HZ*3, "Wrong boot ROM"); return; /* exit */ } is_romless = (result == eROMless); @@ -927,7 +927,7 @@ void DoUserDialog(char* filename) sector = rb->plugin_get_buffer(&memleft); if (memleft < SEC_SIZE) /* need buffer for a flash sector */ { - rb->splash(HZ*3, true, "Out of memory"); + rb->splash(HZ*3, "Out of memory"); return; /* exit */ } diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c index bdf15b7bff..d6083ee7e7 100644 --- a/apps/plugins/flipit.c +++ b/apps/plugins/flipit.c @@ -482,7 +482,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->lcd_set_backdrop(NULL); #endif - rb->splash(HZ, true, "FlipIt!"); + rb->splash(HZ, "FlipIt!"); #ifdef HAVE_LCD_BITMAP /* print instructions */ diff --git a/apps/plugins/helloworld.c b/apps/plugins/helloworld.c index e4220e4af3..6ef5b584ce 100644 --- a/apps/plugins/helloworld.c +++ b/apps/plugins/helloworld.c @@ -41,7 +41,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb = api; /* now go ahead and have fun! */ - rb->splash(HZ*2, true, "Hello world!"); + rb->splash(HZ*2, "Hello world!"); return PLUGIN_OK; } diff --git a/apps/plugins/invadrox.c b/apps/plugins/invadrox.c index 5e537b4bbc..270f08dd1b 100644 --- a/apps/plugins/invadrox.c +++ b/apps/plugins/invadrox.c @@ -1660,12 +1660,12 @@ inline bool handle_buttons(void) } #ifdef RC_QUIT if (pressed & RC_QUIT) { - rb->splash(HZ * 1, true, "Quit"); + rb->splash(HZ * 1, "Quit"); return true; } #endif if (pressed & QUIT) { - rb->splash(HZ * 1, true, "Quit"); + rb->splash(HZ * 1, "Quit"); return true; } } @@ -1772,7 +1772,7 @@ enum plugin_status plugin_start(struct plugin_api* api, UNUSED void* parameter) /* Game Over. */ /* TODO: Play game over sound */ - rb->splash(HZ * 2, true, "Game Over"); + rb->splash(HZ * 2, "Game Over"); if (score > hiscore.score) { /* Save new hiscore */ hiscore.score = score; diff --git a/apps/plugins/iriver_flash.c b/apps/plugins/iriver_flash.c index 29fa440cbb..3d2ae7dcd5 100644 --- a/apps/plugins/iriver_flash.c +++ b/apps/plugins/iriver_flash.c @@ -275,7 +275,7 @@ bool show_info(void) ShowFlashInfo(&fi); if (fi.size == 0) /* no valid chip */ { - rb->splash(HZ*3, true, "Sorry!"); + rb->splash(HZ*3, "Sorry!"); return false; /* exit */ } @@ -288,7 +288,7 @@ bool confirm(const char *msg) bool ret; rb->snprintf(buf, sizeof buf, "%s ([PLAY] to CONFIRM)", msg); - rb->splash(0, true, buf); + rb->splash(0, buf); ret = (wait_for_button() == BUTTON_ON); show_info(); @@ -311,7 +311,7 @@ int load_firmware_file(const char *filename, uint32_t *checksum) if (audiobuf_size < len) { - rb->splash(HZ*3, true, "Aborting: Out of memory!"); + rb->splash(HZ*3, "Aborting: Out of memory!"); rb->close(fd); return -2; } @@ -324,7 +324,7 @@ int load_firmware_file(const char *filename, uint32_t *checksum) rb->close(fd); if (rc != len) { - rb->splash(HZ*3, true, "Aborting: Read failure"); + rb->splash(HZ*3, "Aborting: Read failure"); return -3; } @@ -335,7 +335,7 @@ int load_firmware_file(const char *filename, uint32_t *checksum) if (sum != *checksum) { - rb->splash(HZ*3, true, "Aborting: Checksums mismatch!"); + rb->splash(HZ*3, "Aborting: Checksums mismatch!"); return -4; } @@ -393,7 +393,7 @@ int flash_rockbox(const char *filename, int section) p8 = (char *)BOOTLOADER_ENTRYPOINT; if (!detect_valid_bootloader(p8, 0)) { - rb->splash(HZ*3, true, "Incompatible bootloader"); + rb->splash(HZ*3, "Incompatible bootloader"); return -1; } @@ -423,7 +423,7 @@ int flash_rockbox(const char *filename, int section) { rb->snprintf(buf, sizeof(buf), "Incorrect relocation: 0x%08x/0x%08x", *p32, pos+sizeof(struct flash_header)); - rb->splash(HZ*10, true, buf); + rb->splash(HZ*10, buf); return -1; } @@ -489,7 +489,7 @@ int flash_rockbox(const char *filename, int section) if (sum != checksum) { - rb->splash(HZ*3, true, "Verify failed!"); + rb->splash(HZ*3, "Verify failed!"); /* Erase the magic sector so bootloader does not try to load * rockbox from flash and crash. */ if (section == SECT_RAMIMAGE) @@ -499,17 +499,17 @@ int flash_rockbox(const char *filename, int section) return -5; } - rb->splash(HZ*2, true, "Success"); + rb->splash(HZ*2, "Success"); return 0; } void show_fatal_error(void) { - rb->splash(HZ*30, true, "Disable idle poweroff, connect AC power and DON'T TURN PLAYER OFF!!"); - rb->splash(HZ*30, true, "Contact Rockbox developers as soon as possible!"); - rb->splash(HZ*30, true, "Your device won't be bricked unless you turn off the power"); - rb->splash(HZ*30, true, "Don't use the device before further instructions from Rockbox developers"); + rb->splash(HZ*30, "Disable idle poweroff, connect AC power and DON'T TURN PLAYER OFF!!"); + rb->splash(HZ*30, "Contact Rockbox developers as soon as possible!"); + rb->splash(HZ*30, "Your device won't be bricked unless you turn off the power"); + rb->splash(HZ*30, "Don't use the device before further instructions from Rockbox developers"); } int flash_bootloader(const char *filename) @@ -533,14 +533,14 @@ int flash_bootloader(const char *filename) if (len > 0xFFFF) { - rb->splash(HZ*3, true, "Too big bootloader"); + rb->splash(HZ*3, "Too big bootloader"); return -1; } /* Verify the crc32 checksum also. */ if (!detect_valid_bootloader(audiobuf, len)) { - rb->splash(HZ*3, true, "Incompatible/Untested bootloader"); + rb->splash(HZ*3, "Incompatible/Untested bootloader"); return -1; } @@ -579,7 +579,7 @@ int flash_bootloader(const char *filename) if (sum != checksum) { - rb->splash(HZ*3, true, "Verify failed!"); + rb->splash(HZ*3, "Verify failed!"); show_fatal_error(); return -5; } @@ -589,13 +589,13 @@ int flash_bootloader(const char *filename) { if (p8[i] != audiobuf[i]) { - rb->splash(HZ*3, true, "Bootvector corrupt!"); + rb->splash(HZ*3, "Bootvector corrupt!"); show_fatal_error(); return -6; } } - rb->splash(HZ*2, true, "Success"); + rb->splash(HZ*2, "Success"); return 0; } @@ -653,7 +653,7 @@ int flash_original_fw(int len) { if (p8[i] != reset_vector[i]) { - rb->splash(HZ*3, true, "Bootvector corrupt!"); + rb->splash(HZ*3, "Bootvector corrupt!"); show_fatal_error(); break; } @@ -665,14 +665,14 @@ int flash_original_fw(int len) { if (p8[i] != audiobuf[i]) { - rb->splash(HZ*3, true, "Verify failed!"); + rb->splash(HZ*3, "Verify failed!"); rb->snprintf(buf, sizeof buf, "at: 0x%08x", i); - rb->splash(HZ*10, true, buf); + rb->splash(HZ*10, buf); return -5; } } - rb->splash(HZ*2, true, "Success"); + rb->splash(HZ*2, "Success"); return 0; } @@ -695,7 +695,7 @@ int load_original_bin(const char *filename) rb->read(fd, magic, 8); if (magic[1] != 0x00000008 || len <= 0 || len > audiobuf_size) { - rb->splash(HZ*2, true, "Not an original firmware file"); + rb->splash(HZ*2, "Not an original firmware file"); rb->close(fd); return -1; } @@ -705,7 +705,7 @@ int load_original_bin(const char *filename) if (rc != len) { - rb->splash(HZ*2, true, "Read error"); + rb->splash(HZ*2, "Read error"); return -2; } @@ -737,7 +737,7 @@ int load_romdump(const char *filename) if (rc != len) { - rb->splash(HZ*2, true, "Read error"); + rb->splash(HZ*2, "Read error"); return -2; } @@ -756,14 +756,14 @@ void DoUserDialog(char* filename) /* this can only work if Rockbox runs in DRAM, not flash ROM */ if ((uint16_t*)rb >= FB && (uint16_t*)rb < FB + 4096*1024) /* 4 MB max */ { /* we're running from flash */ - rb->splash(HZ*3, true, "Not from ROM"); + rb->splash(HZ*3, "Not from ROM"); return; /* exit */ } /* refuse to work if the power may fail meanwhile */ if (!rb->battery_level_safe()) { - rb->splash(HZ*3, true, "Battery too low!"); + rb->splash(HZ*3, "Battery too low!"); return; /* exit */ } @@ -773,7 +773,7 @@ void DoUserDialog(char* filename) if (filename == NULL) { - rb->splash(HZ*3, true, "Please use this plugin with \"Open with...\""); + rb->splash(HZ*3, "Please use this plugin with \"Open with...\""); return ; } @@ -790,7 +790,7 @@ void DoUserDialog(char* filename) else if (rb->strcasestr(filename, "/internal_rom_000000-1FFFFF.bin")) load_romdump(filename); else - rb->splash(HZ*3, true, "Unknown file type"); + rb->splash(HZ*3, "Unknown file type"); } diff --git a/apps/plugins/iriverify.c b/apps/plugins/iriverify.c index 555c9200e3..91d890e457 100644 --- a/apps/plugins/iriverify.c +++ b/apps/plugins/iriverify.c @@ -144,28 +144,28 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) stringbuffer = buf; rb->lcd_clear_display(); - rb->splash(0, true, "Converting..."); + rb->splash(0, "Converting..."); rc = read_buffer(0); if(rc == 0) { rb->lcd_clear_display(); - rb->splash(0, true, "Writing..."); + rb->splash(0, "Writing..."); rc = write_file(); if(rc < 0) { rb->lcd_clear_display(); - rb->splash(HZ, true, "Can't write file: %d", rc); + rb->splash(HZ, "Can't write file: %d", rc); } else { rb->lcd_clear_display(); - rb->splash(HZ, true, "Done"); + rb->splash(HZ, "Done"); } } else { if(rc < 0) { rb->lcd_clear_display(); - rb->splash(HZ, true, "Can't read file: %d", rc); + rb->splash(HZ, "Can't read file: %d", rc); } else { rb->lcd_clear_display(); - rb->splash(HZ, true, "The file is too big"); + rb->splash(HZ, "The file is too big"); } } diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c index d0bf1af5e1..d4bef240e8 100644 --- a/apps/plugins/jewels.c +++ b/apps/plugins/jewels.c @@ -1026,7 +1026,7 @@ static unsigned int jewels_nextlevel(struct game_context* bj) { while(bj->score >= LEVEL_PTS) { bj->score -= LEVEL_PTS; bj->level++; - rb->splash(HZ*2, true, "Level %d", bj->level); + rb->splash(HZ*2, "Level %d", bj->level); jewels_drawboard(bj); } @@ -1165,7 +1165,7 @@ static void jewels_savegame(struct game_context* bj) { static void jewels_callback(void* param) { struct game_context* bj = (struct game_context*) param; if(bj->dirty) { - rb->splash(HZ, true, "Saving high scores..."); + rb->splash(HZ, "Saving high scores..."); jewels_savescores(bj); } } @@ -1211,7 +1211,7 @@ static int jewels_main(struct game_context* bj) { case MRES_RESUME: if(!jewels_loadgame(bj)) { - rb->splash(HZ*2, true, "Nothing to resume"); + rb->splash(HZ*2, "Nothing to resume"); rb->lcd_clear_display(); } else { startgame = true; @@ -1438,7 +1438,7 @@ static int jewels_main(struct game_context* bj) { break; case MRES_SAVE: - rb->splash(HZ, true, "Saving game..."); + rb->splash(HZ, "Saving game..."); jewels_savegame(bj); return BJ_END; @@ -1602,14 +1602,14 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { while(!exit) { switch(jewels_main(&bj)){ case BJ_LOSE: - rb->splash(HZ*2, true, "No more moves!"); + rb->splash(HZ*2, "No more moves!"); /* fall through to BJ_END */ case BJ_END: if(!bj.resume) { if((position = jewels_recordscore(&bj))) { rb->snprintf(str, 19, "New high score #%d!", position); - rb->splash(HZ*2, true, str); + rb->splash(HZ*2, str); } } break; @@ -1620,7 +1620,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { case BJ_QUIT: if(bj.dirty) { - rb->splash(HZ, true, "Saving high scores..."); + rb->splash(HZ, "Saving high scores..."); jewels_savescores(&bj); } exit = true; @@ -1630,11 +1630,11 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { if(!bj.resume) { if((position = jewels_recordscore(&bj))) { rb->snprintf(str, 19, "New high score #%d!", position); - rb->splash(HZ*2, true, str); + rb->splash(HZ*2, str); } } if(bj.dirty) { - rb->splash(HZ, true, "Saving high scores..."); + rb->splash(HZ, "Saving high scores..."); jewels_savescores(&bj); } exit = true; diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c index f96c954e54..c6cb2701c0 100644 --- a/apps/plugins/jpeg.c +++ b/apps/plugins/jpeg.c @@ -2083,7 +2083,7 @@ int change_filename(int direct) if(count == entries && file_pt[curfile] == '\0') { - rb->splash(HZ,true,"No supported files"); + rb->splash(HZ, "No supported files"); return PLUGIN_ERROR; } if(rb->strlen(tree->currdir) > 1) @@ -2557,7 +2557,7 @@ struct t_disp* get_image(struct jpeg* p_jpg, int ds) #endif if (status) { - rb->splash(HZ, true, "decode error %d", status); + rb->splash(HZ, "decode error %d", status); file_pt[curfile] = '\0'; return NULL; } @@ -2619,7 +2619,7 @@ int load_and_show(char* filename) if (fd < 0) { rb->snprintf(print,sizeof(print),"err opening %s:%d",filename,fd); - rb->splash(HZ, true, print); + rb->splash(HZ, print); return PLUGIN_ERROR; } filesize = rb->filesize(fd); @@ -2696,7 +2696,7 @@ int load_and_show(char* filename) else #endif { - rb->splash(HZ, true, "Out of Memory"); + rb->splash(HZ, "Out of Memory"); rb->close(fd); return PLUGIN_ERROR; } @@ -2743,7 +2743,7 @@ int load_and_show(char* filename) if (status < 0 || (status & (DQT | SOF0)) != (DQT | SOF0)) { /* bad format or minimum components not contained */ - rb->splash(HZ, true, "unsupported %d", status); + rb->splash(HZ, "unsupported %d", status); file_pt[curfile] = '\0'; return change_filename(direction); } @@ -2762,7 +2762,7 @@ int load_and_show(char* filename) ds_min = min_downscale(&jpg, buf_size); /* check memory constraint */ if (ds_min == 0) { - rb->splash(HZ, true, "too large"); + rb->splash(HZ, "too large"); file_pt[curfile] = '\0'; return change_filename(direction); } @@ -2902,7 +2902,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) buf_size -= graysize; if (grayscales < 33 || buf_size <= 0) { - rb->splash(HZ, true, "gray buf error"); + rb->splash(HZ, "gray buf error"); return PLUGIN_ERROR; } #else diff --git a/apps/plugins/lib/overlay.c b/apps/plugins/lib/overlay.c index 91f08e23f0..edae36671f 100644 --- a/apps/plugins/lib/overlay.c +++ b/apps/plugins/lib/overlay.c @@ -54,7 +54,7 @@ enum plugin_status run_overlay(struct plugin_api* rb, void* parameter, fd = rb->open(filename, O_RDONLY); if (fd < 0) { - rb->splash(2*HZ, true, "Can't open %s", filename); + rb->splash(2*HZ, "Can't open %s", filename); return PLUGIN_ERROR; } readsize = rb->read(fd, &header, sizeof(header)); @@ -64,17 +64,17 @@ enum plugin_status run_overlay(struct plugin_api* rb, void* parameter, if (readsize != sizeof(header)) { - rb->splash(2*HZ, true, "Reading %s overlay failed.", name); + rb->splash(2*HZ, "Reading %s overlay failed.", name); return PLUGIN_ERROR; } if (header.magic != PLUGIN_MAGIC || header.target_id != TARGET_ID) { - rb->splash(2*HZ, true, "%s overlay: Incompatible model.", name); + rb->splash(2*HZ, "%s overlay: Incompatible model.", name); return PLUGIN_ERROR; } if (header.api_version != PLUGIN_API_VERSION) { - rb->splash(2*HZ, true, "%s overlay: Incompatible version.", name); + rb->splash(2*HZ, "%s overlay: Incompatible version.", name); return PLUGIN_ERROR; } @@ -82,14 +82,14 @@ enum plugin_status run_overlay(struct plugin_api* rb, void* parameter, if (header.load_addr < audiobuf || header.end_addr > audiobuf + audiobuf_size) { - rb->splash(2*HZ, true, "%s overlay doesn't fit into memory.", name); + rb->splash(2*HZ, "%s overlay doesn't fit into memory.", name); return PLUGIN_ERROR; } fd = rb->open(filename, O_RDONLY); if (fd < 0) { - rb->splash(2*HZ, true, "Can't open %s", filename); + rb->splash(2*HZ, "Can't open %s", filename); return PLUGIN_ERROR; } readsize = rb->read(fd, header.load_addr, header.end_addr - header.load_addr); @@ -97,7 +97,7 @@ enum plugin_status run_overlay(struct plugin_api* rb, void* parameter, if (readsize < 0) { - rb->splash(2*HZ, true, "Reading %s overlay failed.", name); + rb->splash(2*HZ, "Reading %s overlay failed.", name); return PLUGIN_ERROR; } /* Zero out bss area */ diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c index 251c6cb259..68b8bc4b93 100644 --- a/apps/plugins/logo.c +++ b/apps/plugins/logo.c @@ -259,7 +259,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { #ifdef HAVE_LCD_CHARCELLS if (!pgfx_init(rb, 4, 2)) { - rb->splash(HZ*2, true, "Old LCD :("); + rb->splash(HZ*2, "Old LCD :("); return PLUGIN_OK; } #endif diff --git a/apps/plugins/mazezam.c b/apps/plugins/mazezam.c index cd7446eee2..8a737d235e 100644 --- a/apps/plugins/mazezam.c +++ b/apps/plugins/mazezam.c @@ -705,7 +705,7 @@ static enum level_state level_loop(short level, short lives) { */ rb->lcd_remote_clear_display(); #endif - rb->splash(MAZEZAM_LEVEL_LIVES_DELAY, true, MAZEZAM_LEVEL_LIVES_TEXT, level+1, lives); + rb->splash(MAZEZAM_LEVEL_LIVES_DELAY, MAZEZAM_LEVEL_LIVES_TEXT, level+1, lives); /* ensure keys pressed during the splash screen are ignored */ rb->button_clear_queue(); @@ -844,7 +844,7 @@ static enum game_state game_loop(struct resume_data *r) { */ rb->lcd_remote_clear_display(); #endif - rb->splash(MAZEZAM_GAMEOVER_DELAY, true, MAZEZAM_GAMEOVER_TEXT); + rb->splash(MAZEZAM_GAMEOVER_DELAY, MAZEZAM_GAMEOVER_TEXT); break; case GAME_STATE_COMPLETED: diff --git a/apps/plugins/midi/guspat.c b/apps/plugins/midi/guspat.c index 509a864528..716c20d99e 100644 --- a/apps/plugins/midi/guspat.c +++ b/apps/plugins/midi/guspat.c @@ -146,7 +146,7 @@ struct GPatch * gusload(char * filename) { char message[50]; rb->snprintf(message, 50, "Error opening %s", filename); - rb->splash(HZ*2, true, message); + rb->splash(HZ*2, message); return NULL; } diff --git a/apps/plugins/midi/synth.c b/apps/plugins/midi/synth.c index f65a062c43..78aaab18f4 100644 --- a/apps/plugins/midi/synth.c +++ b/apps/plugins/midi/synth.c @@ -92,7 +92,7 @@ int initSynth(struct MIDIfile * mf, char * filename, char * drumConfig) if(mf->tracks[a] == NULL) { printf("\nNULL TRACK !!!"); - rb->splash(HZ*2, true, "Null Track in loader."); + rb->splash(HZ*2, "Null Track in loader."); return -1; } @@ -115,8 +115,7 @@ int initSynth(struct MIDIfile * mf, char * filename, char * drumConfig) printf("\nPlease install the instruments."); printf("\nSee Rockbox page for more info."); - rb->splash(HZ*2, true, "No Instruments"); - rb->splash(HZ*2, true, "No Instruments"); + rb->splash(HZ*2, "No Instruments"); return -1; } @@ -151,7 +150,7 @@ int initSynth(struct MIDIfile * mf, char * filename, char * drumConfig) file = rb->open(drumConfig, O_RDONLY); if(file < 0) { - rb->splash(HZ*2, true, "Bad drum config.\nDid you install the patchset?"); + rb->splash(HZ*2, "Bad drum config. Did you install the patchset?"); return -1; } diff --git a/apps/plugins/midi2wav.c b/apps/plugins/midi2wav.c index d4d5166fe0..368c8b9125 100644 --- a/apps/plugins/midi2wav.c +++ b/apps/plugins/midi2wav.c @@ -74,16 +74,16 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) if(parameter == NULL) { - rb->splash(HZ*2, true, " Play .MID file "); + rb->splash(HZ*2, "Play .MID file"); return PLUGIN_OK; } - rb->splash(HZ, true, parameter); + rb->splash(HZ, parameter); if(midimain(parameter) == -1) { return PLUGIN_ERROR; } - rb->splash(HZ*3, true, "FINISHED PLAYING"); + rb->splash(HZ*3, "FINISHED PLAYING"); /* Return PLUGIN_USB_CONNECTED to force a file-tree refresh */ return PLUGIN_USB_CONNECTED; } @@ -102,11 +102,11 @@ int midimain(void * filename) printf("\nHello.\n"); - rb->splash(HZ/5, true, "LOADING MIDI"); + rb->splash(HZ/5, "LOADING MIDI"); struct MIDIfile * mf = loadFile(filename); - rb->splash(HZ/5, true, "LOADING PATCHES"); + rb->splash(HZ/5, "LOADING PATCHES"); if (initSynth(mf, "/.rockbox/patchset/patchset.cfg", "/.rockbox/patchset/drums.cfg") == -1) { return -1; @@ -153,7 +153,7 @@ int midimain(void * filename) #endif - rb->splash(HZ/5, true, " I hope this works... "); + rb->splash(HZ/5, "I hope this works..."); diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c index 2500fed8ce..26565f335f 100644 --- a/apps/plugins/minesweeper.c +++ b/apps/plugins/minesweeper.c @@ -650,7 +650,7 @@ enum minesweeper_status minesweeper( void ) if( no_mines ) break; tiles_left = count_tiles_left(); - rb->splash( HZ*2, true, "You found %d mines out of %d", + rb->splash( HZ*2, "You found %d mines out of %d", tiles_left, mine_num ); break; @@ -681,13 +681,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) switch( minesweeper() ) { case MINESWEEPER_WIN: - rb->splash( HZ, true, "You Win!" ); + rb->splash( HZ, "You Win!" ); rb->lcd_clear_display(); mine_show(); break; case MINESWEEPER_LOSE: - rb->splash( HZ, true, "You Lose!" ); + rb->splash( HZ, "You Lose!" ); rb->lcd_clear_display(); mine_show(); break; diff --git a/apps/plugins/mosaique.c b/apps/plugins/mosaique.c index dca2c304b0..093e642703 100644 --- a/apps/plugins/mosaique.c +++ b/apps/plugins/mosaique.c @@ -116,7 +116,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) #ifdef HAVE_LCD_CHARCELLS if (!pgfx_init(rb, 4, 2)) { - rb->splash(HZ*2, true, "Old LCD :("); + rb->splash(HZ*2, "Old LCD :("); return PLUGIN_OK; } pgfx_display(3, 0); diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index 684a491872..f292e3dbb3 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c @@ -354,10 +354,10 @@ static void get_next_data( Stream* str ) } else if ((p[4] & 0xf0) == 0x20) { /* mpeg-1 */ p += 12; } else { - rb->splash( 30, true, "Weird Pack header!" ); + rb->splash( 30, "Weird Pack header!" ); p += 5; } - /*rb->splash( 30, true, "Pack header" );*/ + /*rb->splash( 30, "Pack header" );*/ } /* System header, parse and skip it */ @@ -370,14 +370,14 @@ static void get_next_data( Stream* str ) header_length += *(p++); p += header_length; - /*rb->splash( 30, true, "System header" );*/ + /*rb->splash( 30, "System header" );*/ } /* Packet header, parse it */ if( rb->memcmp (p, packet_start_code_prefix, sizeof (packet_start_code_prefix)) != 0 ) { /* Problem */ - //rb->splash( HZ*3, true, "missing packet start code prefix : %X%X at %X", *p, *(p+2), p-disk_buf ); + //rb->splash( HZ*3, "missing packet start code prefix : %X%X at %X", *p, *(p+2), p-disk_buf ); str->curr_packet_end = str->curr_packet = NULL; return; //++p; @@ -389,7 +389,7 @@ static void get_next_data( Stream* str ) length = (*(p+4)) << 8; length += *(p+5); - /*rb->splash( 100, true, "Stream : %X", stream );*/ + /*rb->splash( 100, "Stream : %X", stream );*/ if (stream != str->id) { /* End of stream ? */ @@ -436,7 +436,7 @@ static void get_next_data( Stream* str ) length++; if (length > 23) { - rb->splash( 30, true, "Too much stuffing" ); + rb->splash( 30, "Too much stuffing" ); break; } } @@ -551,7 +551,7 @@ static void mad_decode(void) } len = audio_str.curr_packet_end - audio_str.curr_packet; if (n + len > mpa_buffer_size) { - rb->splash( 30, true, "Audio buffer overflow" ); + rb->splash( 30, "Audio buffer overflow" ); audiostatus=STREAM_DONE; /* Wait to be killed */ for (;;) { rb->sleep(HZ); } @@ -898,7 +898,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) eta = 0; - rb->splash(0,true,"Buffering..."); + rb->splash(0, "Buffering..."); disk_buf_end = buffer + rb->read (in_file, buffer, buffer_size); disk_buf = buffer; @@ -913,7 +913,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) (uint8_t*)video_stack,VIDEO_STACKSIZE,"mpgvideo" IF_PRIO(,PRIORITY_PLAYBACK) IF_COP(, COP, true))) == NULL) { - rb->splash(HZ,true,"Cannot create video thread!"); + rb->splash(HZ, "Cannot create video thread!"); return PLUGIN_ERROR; } @@ -921,7 +921,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) (uint8_t*)audio_stack,AUDIO_STACKSIZE,"mpgaudio" IF_PRIO(,PRIORITY_PLAYBACK) IF_COP(, CPU, false))) == NULL) { - rb->splash(HZ,true,"Cannot create audio thread!"); + rb->splash(HZ, "Cannot create audio thread!"); rb->remove_thread(videothread_id); return PLUGIN_ERROR; } diff --git a/apps/plugins/nim.c b/apps/plugins/nim.c index d937af168b..b309e296c0 100644 --- a/apps/plugins/nim.c +++ b/apps/plugins/nim.c @@ -156,7 +156,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) hsmile=rb->lcd_get_locked_pattern(); - rb->splash(HZ, true, "NIM V1.2"); + rb->splash(HZ, "NIM V1.2"); rb->lcd_clear_display(); /* Main loop */ diff --git a/apps/plugins/pacbox/pacbox.c b/apps/plugins/pacbox/pacbox.c index 4c539c593f..3a56430106 100644 --- a/apps/plugins/pacbox/pacbox.c +++ b/apps/plugins/pacbox/pacbox.c @@ -412,13 +412,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) /* Save the user settings if they have changed */ if (rb->memcmp(&settings,&old_settings,sizeof(settings))!=0) { - rb->splash(0,true,"Saving settings..."); + rb->splash(0, "Saving settings..."); configfile_save(SETTINGS_FILENAME, config, sizeof(config)/sizeof(*config), SETTINGS_VERSION); } } else { - rb->splash(HZ*2,true,"No ROMs in /.rockbox/pacman/"); + rb->splash(HZ*2, "No ROMs in /.rockbox/pacman/"); } #ifdef HAVE_ADJUSTABLE_CPU_FREQ diff --git a/apps/plugins/pong.c b/apps/plugins/pong.c index a0889b8281..b799a0a37a 100644 --- a/apps/plugins/pong.c +++ b/apps/plugins/pong.c @@ -245,7 +245,7 @@ void bounce(struct pong *p, int pad, int info) void score(struct pong *p, int pad) { - rb->splash(HZ/4, true, "%s scores!", pad?"right":"left"); + rb->splash(HZ/4, "%s scores!", pad?"right":"left"); rb->lcd_clear_display(); p->score[pad]++; @@ -424,7 +424,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) /* go go go */ while(game > 0) { if (game == 2) { /* Game Paused */ - rb->splash(0, true, "PAUSED"); + rb->splash(0, "PAUSED"); while(game == 2) game = keys(&pong); /* short circuit */ rb->lcd_clear_display(); diff --git a/apps/plugins/random_folder_advance_config.c b/apps/plugins/random_folder_advance_config.c index 3b9f842873..cd3bf9f1c2 100644 --- a/apps/plugins/random_folder_advance_config.c +++ b/apps/plugins/random_folder_advance_config.c @@ -137,7 +137,7 @@ void generate(void) rb->write(fd,&dirs_count,sizeof(int)); if (fd < 0) { - rb->splash(HZ, true, "Couldnt open %s", RFA_FILE); + rb->splash(HZ, "Couldnt open %s", RFA_FILE); return; } #ifndef HAVE_LCD_CHARCELLS @@ -242,11 +242,11 @@ void edit_list(void) { case 0: exit = true; - rb->splash(HZ*2, true, "Saving " RFA_FILE); + rb->splash(HZ*2, "Saving " RFA_FILE); fd = rb->open(RFA_FILE, O_CREAT|O_WRONLY); if (fd < 0) { - rb->splash(HZ, true, "Could Not Open " RFA_FILE); + rb->splash(HZ, "Could Not Open " RFA_FILE); break; } dirs_count = 0; diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c index b77c9b1143..c137814831 100644 --- a/apps/plugins/rockblox.c +++ b/apps/plugins/rockblox.c @@ -854,7 +854,7 @@ static int rockblox_loop (void) /* Restore user's original backlight setting */ rb->backlight_set_timeout (rb->global_settings->backlight_timeout); - rb->splash(0, true, "Paused"); + rb->splash(0, "Paused"); while (rb->button_hold ()) rb->sleep(HZ/10); @@ -939,7 +939,7 @@ static int rockblox_loop (void) break; #ifdef ROCKBLOX_RESTART case ROCKBLOX_RESTART: - rb->splash (HZ * 1, true, "Restarting..."); + rb->splash (HZ * 1, "Restarting..."); init_rockblox (); new_block (); break; @@ -992,7 +992,7 @@ static int rockblox_loop (void) #if LCD_DEPTH >= 2 rb->lcd_set_foreground (LCD_BLACK); #endif - rb->splash (HZ * 2, true, "Game Over"); + rb->splash (HZ * 2, "Game Over"); init_rockblox (); new_block (); } @@ -1025,7 +1025,7 @@ enum plugin_status plugin_start (struct plugin_api *api, void *parameter) #else if (!pgfx_init(rb, 4, 2)) { - rb->splash(HZ*2, true, "Old LCD :("); + rb->splash(HZ*2, "Old LCD :("); return PLUGIN_OK; } #endif diff --git a/apps/plugins/rockbox_flash.c b/apps/plugins/rockbox_flash.c index 0b713405ed..fbdfdbd7ee 100644 --- a/apps/plugins/rockbox_flash.c +++ b/apps/plugins/rockbox_flash.c @@ -652,14 +652,14 @@ void DoUserDialog(char* filename) /* this can only work if Rockbox runs in DRAM, not flash ROM */ if ((UINT8*)rb >= FB && (UINT8*)rb < FB + 4096*1024) /* 4 MB max */ { /* we're running from flash */ - rb->splash(HZ*3, true, "Not from ROM"); + rb->splash(HZ*3, "Not from ROM"); return; /* exit */ } /* refuse to work if the power may fail meanwhile */ if (!rb->battery_level_safe()) { - rb->splash(HZ*3, true, "Battery too low!"); + rb->splash(HZ*3, "Battery too low!"); return; /* exit */ } @@ -667,7 +667,7 @@ void DoUserDialog(char* filename) sector = rb->plugin_get_buffer(&memleft); if (memleft < SECTORSIZE) /* need buffer for a flash sector */ { - rb->splash(HZ*3, true, "Out of memory"); + rb->splash(HZ*3, "Out of memory"); return; /* exit */ } @@ -681,12 +681,12 @@ void DoUserDialog(char* filename) if (FlashInfo.size == 0) /* no valid chip */ { - rb->splash(HZ*3, true, "Not flashable"); + rb->splash(HZ*3, "Not flashable"); return; /* exit */ } else if (pos == 0) { - rb->splash(HZ*3, true, "No image"); + rb->splash(HZ*3, "No image"); return; /* exit */ } @@ -855,14 +855,14 @@ void DoUserDialog(char* filename) /* this can only work if Rockbox runs in DRAM, not flash ROM */ if ((UINT8*)rb >= FB && (UINT8*)rb < FB + 4096*1024) /* 4 MB max */ { /* we're running from flash */ - rb->splash(HZ*3, true, "Not from ROM"); + rb->splash(HZ*3, "Not from ROM"); return; /* exit */ } /* refuse to work if the power may fail meanwhile */ if (!rb->battery_level_safe()) { - rb->splash(HZ*3, true, "Batt. too low!"); + rb->splash(HZ*3, "Batt. too low!"); return; /* exit */ } @@ -870,7 +870,7 @@ void DoUserDialog(char* filename) sector = rb->plugin_get_buffer(&memleft); if (memleft < SECTORSIZE) /* need buffer for a flash sector */ { - rb->splash(HZ*3, true, "Out of memory"); + rb->splash(HZ*3, "Out of memory"); return; /* exit */ } @@ -879,12 +879,12 @@ void DoUserDialog(char* filename) if (FlashInfo.size == 0) /* no valid chip */ { - rb->splash(HZ*3, true, "Not flashable"); + rb->splash(HZ*3, "Not flashable"); return; /* exit */ } else if (pos == 0) { - rb->splash(HZ*3, true, "No image"); + rb->splash(HZ*3, "No image"); return; /* exit */ } @@ -1016,7 +1016,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) if (parameter == NULL) { - rb->splash(HZ*3, true, "Play .ucl file!"); + rb->splash(HZ*3, "Play .ucl file!"); return PLUGIN_OK; } diff --git a/apps/plugins/rockboy/cpu.c b/apps/plugins/rockboy/cpu.c index 00cfc42684..2bf9e90d2b 100644 --- a/apps/plugins/rockboy/cpu.c +++ b/apps/plugins/rockboy/cpu.c @@ -928,7 +928,7 @@ next: byte *ptr=mbc.rmap[PC>>12]; snprintf(meow,499,"PC: 0x%x 0x%x a: 0x%x\n", ptr,PC, b ? b->address.d : 0); - rb->splash(HZ*2,true,meow); + rb->splash(HZ*2,meow); while(b&&b->address.d!=((unsigned int)(ptr)+PC)) { p=b; diff --git a/apps/plugins/rockboy/dynarec.c b/apps/plugins/rockboy/dynarec.c index 6ab1ec79b4..7c466de986 100644 --- a/apps/plugins/rockboy/dynarec.c +++ b/apps/plugins/rockboy/dynarec.c @@ -433,7 +433,7 @@ void dynamic_recompile (struct dynarec_block *newblock) } #endif snprintf(meow,499,"Recompiling 0x%x",oldpc); - rb->splash(HZ*1,1,meow); + rb->splash(HZ*1,meow); while(!done) { #ifdef DYNA_DEBUG diff --git a/apps/plugins/rockboy/loader.c b/apps/plugins/rockboy/loader.c index 8166220c8e..1317362c2c 100644 --- a/apps/plugins/rockboy/loader.c +++ b/apps/plugins/rockboy/loader.c @@ -189,10 +189,10 @@ int sram_load(void) fd = open(sramfile, O_RDONLY); snprintf(meow,499,"Opening %s %d",sramfile,fd); - rb->splash(HZ*2, true, meow); + rb->splash(HZ*2, meow); if (fd<0) return -1; snprintf(meow,499,"Loading savedata from %s",sramfile); - rb->splash(HZ*2, true, meow); + rb->splash(HZ*2, meow); read(fd,ram.sbank, 8192*mbc.ramsize); close(fd); @@ -211,7 +211,7 @@ int sram_save(void) fd = open(sramfile, O_WRONLY|O_CREAT|O_TRUNC); if (fd<0) return -1; snprintf(meow,499,"Saving savedata to %s",sramfile); - rb->splash(HZ*2, true, meow); + rb->splash(HZ*2, meow); write(fd,ram.sbank, 8192*mbc.ramsize); close(fd); @@ -301,7 +301,7 @@ void loader_init(char *s) romfile = s; if(rom_load()) return; - rb->splash(HZ/2, true, rom.name); + rb->splash(HZ/2, rom.name); snprintf(saveprefix, 499, "%s/%s", savedir, rom.name); diff --git a/apps/plugins/rockboy/menu.c b/apps/plugins/rockboy/menu.c index b49e480f41..abacd2c831 100644 --- a/apps/plugins/rockboy/menu.c +++ b/apps/plugins/rockboy/menu.c @@ -201,7 +201,7 @@ static bool do_file(char *path, char *desc, bool is_load) { /* print out a status message so the user knows the state loaded */ snprintf(buf, 200, "Loaded state from \"%s\"", path); - rb->splash(HZ * 1, true, buf); + rb->splash(HZ * 1, buf); } else { diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c index 01e4de51c5..9b514a4978 100644 --- a/apps/plugins/rockboy/rockboy.c +++ b/apps/plugins/rockboy/rockboy.c @@ -194,7 +194,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) if (!parameter) { - rb->splash(HZ*3, true, "Play gameboy ROM file! (.gb/.gbc)"); + rb->splash(HZ*3, "Play gameboy ROM file! (.gb/.gbc)"); return PLUGIN_OK; } @@ -223,11 +223,11 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) if(shut&&!cleanshut) { - rb->splash(HZ/2, true, errormsg); + rb->splash(HZ/2, errormsg); return PLUGIN_ERROR; } pcm_close(); - rb->splash(HZ/2, true, "Shutting down"); + rb->splash(HZ/2, "Shutting down"); savesettings(); diff --git a/apps/plugins/rockpaint.c b/apps/plugins/rockpaint.c index 27df31092a..2881c64309 100644 --- a/apps/plugins/rockpaint.c +++ b/apps/plugins/rockpaint.c @@ -2475,12 +2475,12 @@ static void goto_menu(void) { if( load_bitmap( filename ) <= 0 ) { - rb->splash( 1*HZ, true, "Error while loading %s", + rb->splash( 1*HZ, "Error while loading %s", filename ); } else { - rb->splash( 1*HZ, true, "Image loaded (%s)", filename ); + rb->splash( 1*HZ, "Image loaded (%s)", filename ); restore_screen(); inv_cursor(true); return; @@ -2492,7 +2492,7 @@ static void goto_menu(void) if( !rb->kbd_input( filename, MAX_PATH ) ) { save_bitmap( filename ); - rb->splash( 1*HZ, true, "File saved (%s)", filename ); + rb->splash( 1*HZ, "File saved (%s)", filename ); } break; @@ -2943,7 +2943,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->lcd_set_foreground(COLOR_WHITE); rb->lcd_set_backdrop(NULL); rb->lcd_fillrect(0,0,LCD_WIDTH,LCD_HEIGHT); - rb->splash( HZ/2, true, "Rock Paint"); + rb->splash( HZ/2, "Rock Paint"); rb->lcd_clear_display(); @@ -2953,12 +2953,12 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { if( load_bitmap( parameter ) <= 0 ) { - rb->splash( 1*HZ, true, "Error"); + rb->splash( 1*HZ, "Error"); clear_drawing(); } else { - rb->splash( 1*HZ, true, "Image loaded (%s)", parameter ); + rb->splash( 1*HZ, "Image loaded (%s)", parameter ); restore_screen(); rb->strcpy( filename, parameter ); } diff --git a/apps/plugins/search.c b/apps/plugins/search.c index 5a30ce6064..6d4cfd2d78 100644 --- a/apps/plugins/search.c +++ b/apps/plugins/search.c @@ -121,7 +121,7 @@ static bool search_init(char* file) if (!rb->kbd_input(search_string,sizeof search_string)) { rb->lcd_clear_display(); - rb->splash(0, true, "Searching..."); + rb->splash(0, "Searching..."); fd = rb->open(file, O_RDONLY); if (fd==-1) return false; @@ -130,9 +130,9 @@ static bool search_init(char* file) if (fdw < 0) { #ifdef HAVE_LCD_BITMAP - rb->splash(HZ, true, "Failed to create result file!"); + rb->splash(HZ, "Failed to create result file!"); #else - rb->splash(HZ, true, "File creation failed"); + rb->splash(HZ, "File creation failed"); #endif return false; } @@ -158,7 +158,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) /* Check the extension. We only allow .m3u files. */ if(rb->strcasecmp(&filename[rb->strlen(filename)-4], ".m3u") && rb->strcasecmp(&filename[rb->strlen(filename)-5], ".m3u8")) { - rb->splash(HZ, true, "Not a .m3u or .m3u8 file"); + rb->splash(HZ, "Not a .m3u or .m3u8 file"); return PLUGIN_ERROR; } @@ -176,7 +176,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) search_buffer(); rb->lcd_clear_display(); - rb->splash(HZ, true, "Done"); + rb->splash(HZ, "Done"); rb->close(fdw); rb->close(fd); diff --git a/apps/plugins/searchengine/parser.c b/apps/plugins/searchengine/parser.c index 76beab49cc..9eabdb6bbe 100644 --- a/apps/plugins/searchengine/parser.c +++ b/apps/plugins/searchengine/parser.c @@ -47,7 +47,7 @@ unsigned char *parse(int fd) { ret=parseMExpr(); if(syntaxerror) { PUTS("Syntaxerror"); - rb->splash(HZ*3,true,errormsg); + rb->splash(HZ*3,errormsg); } parser_accept(TOKEN_EOF); return ret; @@ -267,7 +267,7 @@ unsigned char *parseMExpr() { if(filter[currentlevel][i]) // this should always be true ret[i]=ret[i] || ret2[i]; else - rb->splash(HZ*2,true,"An or is having a filter, bad."); + rb->splash(HZ*2,"An or is having a filter, bad."); } return ret; } diff --git a/apps/plugins/searchengine/searchengine.c b/apps/plugins/searchengine/searchengine.c index 6c2322e950..2687bd9289 100644 --- a/apps/plugins/searchengine/searchengine.c +++ b/apps/plugins/searchengine/searchengine.c @@ -71,7 +71,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) PUTS("SearchEngine v0.1"); parsefd=rb->open(parameter,O_RDONLY); if(parsefd<0) { - rb->splash(2*HZ,true,"Unable to open search tokenstream"); + rb->splash(2*HZ,"Unable to open search tokenstream"); return PLUGIN_ERROR; } result=parse(parsefd); @@ -90,7 +90,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->close(fd); } rb->snprintf(buf,250,"Hits: %d",hits); - rb->splash(HZ*3,true,buf); + rb->splash(HZ*3,buf); if (result!=0) { /* Return PLUGIN_USB_CONNECTED to force a file-tree refresh */ return PLUGIN_USB_CONNECTED; diff --git a/apps/plugins/searchengine/token.c b/apps/plugins/searchengine/token.c index d51d92a712..3c01d4633e 100644 --- a/apps/plugins/searchengine/token.c +++ b/apps/plugins/searchengine/token.c @@ -43,14 +43,14 @@ char *getstring(struct token *token) { return currententry->filename; default: rb->snprintf(buf,199,"unknown stringid intvalue %d",token->intvalue); - rb->splash(HZ*2,true,buf); + rb->splash(HZ*2,buf); return ""; } break; default: // report error rb->snprintf(buf,199,"unknown token %d in getstring..",token->kind); - rb->splash(HZ*2,true,buf); + rb->splash(HZ*2,buf); return ""; } } @@ -104,13 +104,13 @@ int getvalue(struct token *token) { return (currententry->playcount-dbglobal.playcountmin)*10/(dbglobal.playcountmax-dbglobal.playcountmin); default: rb->snprintf(buf,199,"unknown numid intvalue %d",token->intvalue); - rb->splash(HZ*2,true,buf); + rb->splash(HZ*2,buf); // report error. return 0; } default: rb->snprintf(buf,199,"unknown token %d in getvalue..",token->kind); - rb->splash(HZ*2,true,buf); + rb->splash(HZ*2,buf); return 0; } } diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c index b850dfbe11..350beb6dc1 100644 --- a/apps/plugins/snake2.c +++ b/apps/plugins/snake2.c @@ -351,7 +351,7 @@ int load_all_levels(void) num_levels++; if(num_levels > max_levels) { - rb->splash(HZ, true, "Too many levels in file"); + rb->splash(HZ, "Too many levels in file"); break; } continue; @@ -834,7 +834,7 @@ void die (void) bool done=false; char pscore[20]; - rb->splash(HZ*2, true, "Oops!"); + rb->splash(HZ*2, "Oops!"); rb->lcd_clear_display(); @@ -914,7 +914,7 @@ void collision ( int x, int y ) num_apples_to_get+=2; game_b_level++; } - rb->splash(HZ, true, "Level Completed!"); + rb->splash(HZ, "Level Completed!"); rb->lcd_clear_display(); new_level(level_from_file); rb->lcd_clear_display(); @@ -1357,7 +1357,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) load_all_levels(); if (num_levels == 0) { - rb->splash(HZ*2, true, "Failed loading levels!"); + rb->splash(HZ*2, "Failed loading levels!"); return PLUGIN_OK; } diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c index 9e8f4f582f..64d3f2430b 100644 --- a/apps/plugins/snow.c +++ b/apps/plugins/snow.c @@ -181,7 +181,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) #ifdef HAVE_LCD_CHARCELLS if (!pgfx_init(rb, 4, 2)) { - rb->splash(HZ*2, true, "Old LCD :("); + rb->splash(HZ*2, "Old LCD :("); return PLUGIN_OK; } #endif diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c index 7941e97585..6892e83f31 100644 --- a/apps/plugins/sokoban.c +++ b/apps/plugins/sokoban.c @@ -460,7 +460,7 @@ static int read_levels(int initialize_count) endpoint += NUM_BUFFERED_BOARDS; if ((fd = rb->open(LEVELS_FILE, O_RDONLY)) < 0) { - rb->splash(HZ*2, true, "Unable to open %s", LEVELS_FILE); + rb->splash(HZ*2, "Unable to open %s", LEVELS_FILE); return -1; } @@ -472,7 +472,7 @@ static int read_levels(int initialize_count) * a mixed unix and dos CR/LF file format, I'm not going to * do a precise check */ if (len < COLS) { - rb->splash(HZ*2, true, "Error in levels file: short line"); + rb->splash(HZ*2, "Error in levels file: short line"); return -1; } if (level_count >= buffered_boards.low && level_count < endpoint) { @@ -487,8 +487,7 @@ static int read_levels(int initialize_count) level_count++; if (level_count >= endpoint && !initialize_count) break; if (level_count && row != ROWS) { - rb->splash(HZ*2, true, - "Error in levels file: short board"); + rb->splash(HZ*2, "Error in levels file: short board"); return -1; } row = 0; diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c index 2260599bc3..da01f0f608 100644 --- a/apps/plugins/solitaire.c +++ b/apps/plugins/solitaire.c @@ -1159,7 +1159,7 @@ int solitaire( void ) /* if there aren't any, that means you won :) */ if( biggest_col_length == 0 && rem == NOT_A_CARD ) { - rb->splash( HZ, true, "You Won :)" ); + rb->splash( HZ, "You Won :)" ); return bouncing_cards(); } @@ -1588,7 +1588,7 @@ enum plugin_status plugin_start( struct plugin_api* api, void* parameter ) (void)parameter; rb = api; - rb->splash( HZ, true, "Welcome to Solitaire!" ); + rb->splash( HZ, "Welcome to Solitaire!" ); configfile_init(rb); configfile_load(CONFIG_FILENAME, config, diff --git a/apps/plugins/sort.c b/apps/plugins/sort.c index 80ef22fa44..79b5400db2 100644 --- a/apps/plugins/sort.c +++ b/apps/plugins/sort.c @@ -191,32 +191,32 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) pointers = (char **)(buf + buf_size - sizeof(int)); rb->lcd_clear_display(); - rb->splash(0, true, "Loading..."); + rb->splash(0, "Loading..."); rc = read_buffer(0); if(rc == 0) { rb->lcd_clear_display(); - rb->splash(0, true, "Sorting..."); + rb->splash(0, "Sorting..."); sort_buffer(); rb->lcd_clear_display(); - rb->splash(0, true, "Writing..."); + rb->splash(0, "Writing..."); rc = write_file(); if(rc < 0) { rb->lcd_clear_display(); - rb->splash(HZ, true, "Can't write file: %d", rc); + rb->splash(HZ, "Can't write file: %d", rc); } else { rb->lcd_clear_display(); - rb->splash(HZ, true, "Done"); + rb->splash(HZ, "Done"); } } else { if(rc < 0) { rb->lcd_clear_display(); - rb->splash(HZ, true, "Can't read file: %d", rc); + rb->splash(HZ, "Can't read file: %d", rc); } else { rb->lcd_clear_display(); - rb->splash(HZ, true, "The file is too big"); + rb->splash(HZ, "The file is too big"); } } diff --git a/apps/plugins/splitedit.c b/apps/plugins/splitedit.c index b2c704d2d9..a44087e609 100644 --- a/apps/plugins/splitedit.c +++ b/apps/plugins/splitedit.c @@ -543,14 +543,14 @@ static void generateFileName(char* file_name, int part_no) } else { - rb->splash(0, true, "wrong extension"); + rb->splash(0, "wrong extension"); rb->button_get(true); rb->button_get(true); } } else { - rb->splash(0, true, "name too long"); + rb->splash(0, "name too long"); rb->button_get(true); rb->button_get(true); @@ -585,7 +585,7 @@ static int copy_file( bytes_written = rb->write(dest, buffer, bytes_read); if (bytes_written < 0) { - rb->splash(0, true, "Write failed in copy."); + rb->splash(0, "Write failed in copy."); rb->button_get(true); rb->button_get(true); return -1; @@ -598,7 +598,7 @@ static int copy_file( || button == SPLITEDIT_RC_QUIT: #endif ) { - rb->splash(0, true, "Aborting copy."); + rb->splash(0, "Aborting copy."); rb->button_get(true); rb->button_get(true); return -1; @@ -632,7 +632,7 @@ static int save( if (file1 >= 0) { rb->close(file1); - rb->splash(0, true, "File 1 exists. Please rename."); + rb->splash(0, "File 1 exists. Please rename."); rb->button_get(true); rb->button_get(true); return -1; @@ -646,7 +646,7 @@ static int save( if (file2 >= 0) { rb->close(file2); - rb->splash(0, true, "File 2 exists. Please rename."); + rb->splash(0, "File 2 exists. Please rename."); rb->button_get(true); rb->button_get(true); return -2; @@ -688,8 +688,7 @@ static int save( if (close_stat != 0) { - rb->splash(0, true, - "failed closing file1: error %d", close_stat); + rb->splash(0, "failed closing file1: error %d", close_stat); rb->button_get(true); rb->button_get(true); } else { @@ -701,8 +700,7 @@ static int save( } else { - rb->splash(0, true, - "Can't write File1: error %d", file1); + rb->splash(0, "Can't write File1: error %d", file1); rb->button_get(true); rb->button_get(true); retval = -1; @@ -713,8 +711,7 @@ static int save( { if (rb->lseek(src_file, end, SEEK_SET) < (off_t)end) { - rb->splash(0, true, - "Src file to short: error %d", src_file); + rb->splash(0, "Src file to short: error %d", src_file); rb->button_get(true); rb->button_get(true); } @@ -732,8 +729,8 @@ static int save( if (close_stat != 0) { - rb->splash(0, true, - "failed: closing file2: error %d", close_stat); + rb->splash(0, "failed: closing file2: error %d", + close_stat); rb->button_get(true); rb->button_get(true); } else { @@ -745,8 +742,7 @@ static int save( } else { - rb->splash(0, true, - "Can't write File2: error %d", file2); + rb->splash(0, "Can't write File2: error %d", file2); rb->button_get(true); rb->button_get(true); retval = -2; @@ -756,15 +752,14 @@ static int save( close_stat = rb->close(src_file); if (close_stat != 0) { - rb->splash(0, true, - "failed: closing src: error %d", close_stat); + rb->splash(0, "failed: closing src: error %d", close_stat); rb->button_get(true); rb->button_get(true); } } else { - rb->splash(0, true, "Source file not found"); + rb->splash(0, "Source file not found"); rb->button_get(true); rb->button_get(true); retval = -3; @@ -1051,7 +1046,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split, /* MMC is slow - wait some time to allow track reload to finish */ rb->sleep(HZ/20); if (mp3->elapsed > play_end) /* reload in progress */ - rb->splash(10*HZ, true, "Wait - reloading"); + rb->splash(10*HZ, "Wait - reloading"); #endif rb->audio_resume(); break; @@ -1063,7 +1058,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split, /* MMC is slow - wait some time to allow track reload to finish */ rb->sleep(HZ/20); if (mp3->elapsed > play_end) /* reload in progress */ - rb->splash(10*HZ, true, "Wait - reloading"); + rb->splash(10*HZ, "Wait - reloading"); #endif rb->audio_resume(); break; @@ -1228,7 +1223,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split, if (rb->strncasecmp(path_mp3, new_mp3->path, sizeof (path_mp3))) { - rb->splash(0, true,"Abort due to file change"); + rb->splash(0, "Abort due to file change"); rb->button_get(true); rb->button_get(true); exit_request = true; @@ -1272,7 +1267,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) } else { - rb->splash(0, true, "Play or pause a mp3 file first."); + rb->splash(0, "Play or pause a mp3 file first."); rb->button_get(true); rb->button_get(true); } diff --git a/apps/plugins/stats.c b/apps/plugins/stats.c index b6a824e208..b69ab2d8e0 100644 --- a/apps/plugins/stats.c +++ b/apps/plugins/stats.c @@ -180,13 +180,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) #ifdef HAVE_LCD_BITMAP rb->lcd_getstringsize("Files: ", &fontwidth, &fontheight); #endif - rb->splash(HZ, true, "Counting..."); + rb->splash(HZ, "Counting..."); update_screen(); lasttick = *rb->current_tick; traversedir("", ""); if (abort == true) { - rb->splash(HZ, true, "Aborted"); + rb->splash(HZ, "Aborted"); return PLUGIN_OK; } update_screen(); @@ -194,7 +194,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->remote_backlight_on(); #endif rb->backlight_on(); - rb->splash(HZ, true, "Done"); + rb->splash(HZ, "Done"); update_screen(); button = rb->button_get(true); while (1) { diff --git a/apps/plugins/sudoku/sudoku.c b/apps/plugins/sudoku/sudoku.c index 218a544f8c..59adb77fa9 100644 --- a/apps/plugins/sudoku/sudoku.c +++ b/apps/plugins/sudoku/sudoku.c @@ -490,7 +490,7 @@ void sudoku_solve(struct sudoku_state_t* state) } } } else { - rb->splash(HZ*2, true, "Solve failed"); + rb->splash(HZ*2, "Solve failed"); } return; @@ -696,7 +696,7 @@ bool save_sudoku(struct sudoku_state_t* state) char line[13]; char sep[13]; - rb->splash(0, true, "Saving..."); + rb->splash(0, "Saving..."); rb->memcpy(line,"...|...|...\r\n",13); rb->memcpy(sep,"-----------\r\n",13); @@ -966,7 +966,7 @@ bool sudoku_generate(struct sudoku_state_t* state) clear_state(&new_state); display_board(&new_state); - rb->splash(0, true, "Generating..."); + rb->splash(0, "Generating..."); #ifdef HAVE_ADJUSTABLE_CPU_FREQ rb->cpu_boost(true); @@ -982,11 +982,11 @@ bool sudoku_generate(struct sudoku_state_t* state) rb->memcpy(state,&new_state,sizeof(new_state)); rb->snprintf(str,sizeof(str),"Difficulty: %s",difficulty); display_board(state); - rb->splash(HZ*3, true, str); + rb->splash(HZ*3, str); rb->strncpy(state->filename,GAME_FILE,MAX_PATH); } else { display_board(&new_state); - rb->splash(HZ*2, true, "Aborted"); + rb->splash(HZ*2, "Aborted"); } return res; } @@ -1079,7 +1079,7 @@ int sudoku_edit_menu(struct sudoku_state_t* state) if (save_sudoku(state)) { state->editmode=0; } else { - rb->splash(HZ*2, true, "Save failed"); + rb->splash(HZ*2, "Save failed"); } break; @@ -1101,7 +1101,7 @@ void move_cursor(struct sudoku_state_t* state, int newx, int newy) /* Check that the character at the cursor position is legal */ if (check_status(state)) { - rb->splash(HZ*2, true, "Illegal move!"); + rb->splash(HZ*2, "Illegal move!"); /* Ignore any button presses during the splash */ rb->button_clear_queue(); return; @@ -1148,7 +1148,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) } } else { if (!load_sudoku(&state,(char*)parameter)) { - rb->splash(HZ*2, true, "Load error"); + rb->splash(HZ*2, "Load error"); return(PLUGIN_ERROR); } } @@ -1167,7 +1167,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) /* Exit game */ case SUDOKU_BUTTON_QUIT: if (check_status(&state)) { - rb->splash(HZ*2, true, "Illegal move!"); + rb->splash(HZ*2, "Illegal move!"); /* Ignore any button presses during the splash */ rb->button_clear_queue(); } else { @@ -1316,7 +1316,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) #endif /* Don't let the user leave a game in a bad state */ if (check_status(&state)) { - rb->splash(HZ*2, true, "Illegal move!"); + rb->splash(HZ*2, "Illegal move!"); /* Ignore any button presses during the splash */ rb->button_clear_queue(); } else { diff --git a/apps/plugins/test_disk.c b/apps/plugins/test_disk.c index edc1dfbddb..91fc3bb405 100644 --- a/apps/plugins/test_disk.c +++ b/apps/plugins/test_disk.c @@ -105,7 +105,7 @@ static bool test_fs(void) fd = rb->creat(TEST_FILE); if (fd < 0) { - rb->splash(0, true, "Couldn't create testfile."); + rb->splash(0, "Couldn't create testfile."); goto error; } @@ -123,7 +123,7 @@ static bool test_fs(void) mem_fill_frnd(buf_start + align, current); if (current != rb->write(fd, buf_start + align, current)) { - rb->splash(0, true, "Write error."); + rb->splash(0, "Write error."); rb->close(fd); goto error; } @@ -134,7 +134,7 @@ static bool test_fs(void) fd = rb->open(TEST_FILE, O_RDONLY); if (fd < 0) { - rb->splash(0, true, "Couldn't open testfile."); + rb->splash(0, "Couldn't open testfile."); goto error; } @@ -151,7 +151,7 @@ static bool test_fs(void) if (current != rb->read(fd, buf_start + align, current)) { - rb->splash(0, true, "Read error."); + rb->splash(0, "Read error."); rb->close(fd); goto error; } @@ -196,13 +196,13 @@ static bool test_speed(void) fd = rb->creat(TEST_FILE); if (fd < 0) { - rb->splash(0, true, "Couldn't create testfile."); + rb->splash(0, "Couldn't create testfile."); goto error; } time = *rb->current_tick; if (buf_len != rb->write(fd, buf_start, buf_len)) { - rb->splash(0, true, "Write error."); + rb->splash(0, "Write error."); rb->close(fd); goto error; } @@ -215,13 +215,13 @@ static bool test_speed(void) fd = rb->open(TEST_FILE, O_WRONLY); if (fd < 0) { - rb->splash(0, true, "Couldn't open testfile."); + rb->splash(0, "Couldn't open testfile."); goto error; } time = *rb->current_tick; if (buf_len != rb->write(fd, buf_start, buf_len)) { - rb->splash(0, true, "Write error."); + rb->splash(0, "Write error."); rb->close(fd); goto error; } @@ -234,13 +234,13 @@ static bool test_speed(void) fd = rb->open(TEST_FILE, O_WRONLY); if (fd < 0) { - rb->splash(0, true, "Couldn't open testfile."); + rb->splash(0, "Couldn't open testfile."); goto error; } time = *rb->current_tick; if (buf_len != rb->write(fd, buf_start + 1, buf_len)) { - rb->splash(0, true, "Write error."); + rb->splash(0, "Write error."); rb->close(fd); goto error; } @@ -253,13 +253,13 @@ static bool test_speed(void) fd = rb->open(TEST_FILE, O_RDONLY); if (fd < 0) { - rb->splash(0, true, "Couldn't open testfile."); + rb->splash(0, "Couldn't open testfile."); goto error; } time = *rb->current_tick; if (buf_len != rb->read(fd, buf_start, buf_len)) { - rb->splash(0, true, "Read error."); + rb->splash(0, "Read error."); rb->close(fd); goto error; } @@ -272,13 +272,13 @@ static bool test_speed(void) fd = rb->open(TEST_FILE, O_RDONLY); if (fd < 0) { - rb->splash(0, true, "Couldn't open testfile."); + rb->splash(0, "Couldn't open testfile."); goto error; } time = *rb->current_tick; if (buf_len != rb->read(fd, buf_start + 1, buf_len)) { - rb->splash(0, true, "Read error."); + rb->splash(0, "Read error."); rb->close(fd); goto error; } diff --git a/apps/plugins/text_editor.c b/apps/plugins/text_editor.c index bf69acff93..8040d00f22 100644 --- a/apps/plugins/text_editor.c +++ b/apps/plugins/text_editor.c @@ -178,7 +178,7 @@ void save_changes(int overwrite) fd = rb->open(filename,O_WRONLY|O_CREAT|O_TRUNC); if (fd < 0) { - rb->splash(HZ*2,1,"Changes NOT saved"); + rb->splash(HZ*2, "Changes NOT saved"); return; } @@ -315,7 +315,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) fd = rb->open(filename,O_RDONLY); if (fd<0) { - rb->splash(HZ*2,true,"Couldnt open file: %s",(char*)parameter); + rb->splash(HZ*2,"Couldnt open file: %s",(char*)parameter); return PLUGIN_ERROR; } /* read in the file */ @@ -323,7 +323,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { if (!do_action(ACTION_INSERT,temp_line,line_count)) { - rb->splash(HZ*2,true,"Error reading file: %s",(char*)parameter); + rb->splash(HZ*2,"Error reading file: %s",(char*)parameter); rb->close(fd); return PLUGIN_ERROR; } diff --git a/apps/plugins/vbrfix.c b/apps/plugins/vbrfix.c index 9bdaf493f9..c87005f7a3 100644 --- a/apps/plugins/vbrfix.c +++ b/apps/plugins/vbrfix.c @@ -118,7 +118,7 @@ static int insert_data_in_file(char *fname, int fpos, char *buf, int num_bytes) static void fileerror(int rc) { - rb->splash(HZ*2, true, "File error: %d", rc); + rb->splash(HZ*2, "File error: %d", rc); } static const unsigned char empty_id3_header[] = @@ -259,7 +259,7 @@ static bool vbr_fix(char *selected_file) { /* Not a VBR file */ DEBUGF("Not a VBR file\n"); - rb->splash(HZ*2, true, "Not a VBR file"); + rb->splash(HZ*2, "Not a VBR file"); } return false; diff --git a/apps/plugins/video.c b/apps/plugins/video.c index 6cdf92e924..c2f64bbfa6 100644 --- a/apps/plugins/video.c +++ b/apps/plugins/video.c @@ -986,7 +986,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) if (parameter == NULL) { - rb->splash(HZ*2, true, "Play .rvf file!"); + rb->splash(HZ*2, "Play .rvf file!"); return PLUGIN_ERROR; } diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c index 543b5c0d1d..c12c1d41d2 100644 --- a/apps/plugins/viewer.c +++ b/apps/plugins/viewer.c @@ -1043,12 +1043,12 @@ static void viewer_load_settings(void) /* same name as global, but not the same settings_fd=rb->open(SETTINGS_FILE, O_RDONLY); if (settings_fd < 0) { - rb->splash(HZ*2, true, "No Settings File"); + rb->splash(HZ*2, "No Settings File"); return; } if (rb->filesize(settings_fd) != sizeof(struct preferences)) { - rb->splash(HZ*2, true, "Settings File Invalid"); + rb->splash(HZ*2, "Settings File Invalid"); return; } @@ -1313,7 +1313,7 @@ static void viewer_menu(void) switch (result) { case 0: /* quit */ - rb->splash(1, true, "Saving Settings"); + rb->splash(1, "Saving Settings"); rb->menu_exit(m); viewer_exit(NULL); done = true; @@ -1350,7 +1350,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file) file_name = file; ok = viewer_init(); if (!ok) { - rb->splash(HZ, false, "Error"); + rb->splash(HZ, "Error"); viewer_exit(NULL); return PLUGIN_OK; } diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c index 17f4e58165..0f1f72cbc5 100644 --- a/apps/plugins/vu_meter.c +++ b/apps/plugins/vu_meter.c @@ -327,9 +327,9 @@ void load_settings(void) { else { reset_settings(); #if CONFIG_KEYPAD == RECORDER_PAD - rb->splash(HZ, true, "Press ON for help"); + rb->splash(HZ, "Press ON for help"); #elif CONFIG_KEYPAD == ONDIO_PAD - rb->splash(HZ, true, "Press MODE for help"); + rb->splash(HZ, "Press MODE for help"); #endif } } diff --git a/apps/plugins/wav2wv.c b/apps/plugins/wav2wv.c index 2e2076c0ed..07b1d225f8 100644 --- a/apps/plugins/wav2wv.c +++ b/apps/plugins/wav2wv.c @@ -124,19 +124,19 @@ static int wav2wv (char *filename) extension = filename + rb->strlen (filename) - 3; if (rb->strcasecmp (extension, "wav")) { - rb->splash(HZ*2, true, "only for wav files!"); + rb->splash(HZ*2, "only for wav files!"); return 1; } in_fd = rb->open(filename, O_RDONLY); if (in_fd < 0) { - rb->splash(HZ*2, true, "could not open file!"); + rb->splash(HZ*2, "could not open file!"); return true; } if (rb->read (in_fd, &raw_header, sizeof (raw_header)) != sizeof (raw_header)) { - rb->splash(HZ*2, true, "could not read file!"); + rb->splash(HZ*2, "could not read file!"); return true; } @@ -148,7 +148,7 @@ static int wav2wv (char *filename) rb->strncmp (native_header.fmt_ckID, "fmt ", 4) || rb->strncmp (native_header.data_ckID, "data", 4) || native_header.FormatTag != 1 || native_header.BitsPerSample != 16) { - rb->splash(HZ*2, true, "incompatible wav file!"); + rb->splash(HZ*2, "incompatible wav file!"); return true; } @@ -164,7 +164,7 @@ static int wav2wv (char *filename) /* config.flags |= CONFIG_HIGH_FLAG; */ if (!WavpackSetConfiguration (wpc, &config, total_samples)) { - rb->splash(HZ*2, true, "internal error!"); + rb->splash(HZ*2, "internal error!"); rb->close (in_fd); return true; } @@ -180,7 +180,7 @@ static int wav2wv (char *filename) extension [1] = save_a; if (out_fd < 0) { - rb->splash(HZ*2, true, "could not create file!"); + rb->splash(HZ*2, "could not create file!"); rb->close (in_fd); return true; } @@ -201,7 +201,7 @@ static int wav2wv (char *filename) bytes_count = samples_count * num_chans * 2; if (rb->read (in_fd, input_buffer, bytes_count) != (int32_t) bytes_count) { - rb->splash(HZ*2, true, "could not read file!"); + rb->splash(HZ*2, "could not read file!"); error = true; break; } @@ -237,7 +237,7 @@ static int wav2wv (char *filename) } if (!WavpackPackSamples (wpc, temp_buffer, samples_this_pass)) { - rb->splash(HZ*2, true, "internal error!"); + rb->splash(HZ*2, "internal error!"); error = true; break; } @@ -251,7 +251,7 @@ static int wav2wv (char *filename) bytes_count = WavpackFinishBlock (wpc); if (rb->write (out_fd, output_buffer, bytes_count) != (int32_t) bytes_count) { - rb->splash(HZ*2, true, "could not write file!"); + rb->splash(HZ*2, "could not write file!"); error = true; break; } @@ -265,7 +265,7 @@ static int wav2wv (char *filename) buttons = rb->button_status (); if (last_buttons == BUTTON_NONE && buttons != BUTTON_NONE) { - rb->splash(HZ*2, true, "operation aborted!"); + rb->splash(HZ*2, "operation aborted!"); error = true; break; } @@ -285,7 +285,7 @@ static int wav2wv (char *filename) extension [1] = save_a; } else - rb->splash(HZ*3, true, "operation successful"); + rb->splash(HZ*3, "operation successful"); return error; } @@ -309,7 +309,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void *parameter) audiobuf = rb->plugin_get_audio_buffer(&audiobuflen); if (audiobuflen < 0x200000) { - rb->splash(HZ*2, true, "not enough memory!"); + rb->splash(HZ*2, "not enough memory!"); return PLUGIN_ERROR; } diff --git a/apps/plugins/wavplay.c b/apps/plugins/wavplay.c index 2d88ebc40d..faa5b0861a 100644 --- a/apps/plugins/wavplay.c +++ b/apps/plugins/wavplay.c @@ -3465,7 +3465,7 @@ int play_file(char* filename) fd = rb->open(filename, O_RDONLY); if (fd < 0) { - rb->splash(2*HZ, true, "Couldn't open WAV file"); + rb->splash(2*HZ, "Couldn't open WAV file"); return PLAY_ERROR; } @@ -3474,13 +3474,13 @@ int play_file(char* filename) got = rb->read(fd, aud_buf, wanted); /* wav header */ if (got < 0) { - rb->splash(2*HZ, true, "Read error"); + rb->splash(2*HZ, "Read error"); rb->close(fd); return PLAY_ERROR; } else if (got < wanted) { - rb->splash(2*HZ, true, "File too short"); + rb->splash(2*HZ, "File too short"); rb->close(fd); return PLAY_ERROR; } @@ -3490,7 +3490,7 @@ int play_file(char* filename) || rb->memcmp(aud_buf + 12, "fmt ", 4) || rb->memcmp(aud_buf + 36, "data", 4)) { - rb->splash(2*HZ, true, "No canonical WAV file"); + rb->splash(2*HZ, "No canonical WAV file"); rb->close(fd); return PLAY_ERROR; } @@ -3498,7 +3498,7 @@ int play_file(char* filename) format = letoh16(*(uint16_t *)(aud_buf + 20)); if (format != 1) { - rb->splash(2*HZ, true, "Unsupported format: %d", format); + rb->splash(2*HZ, "Unsupported format: %d", format); rb->close(fd); return PLAY_ERROR; } @@ -3506,7 +3506,7 @@ int play_file(char* filename) channels = letoh16(*(uint16_t *)(aud_buf + 22)); if (channels > 2) { - rb->splash(2*HZ, true, "Too many channels: %d", channels); + rb->splash(2*HZ, "Too many channels: %d", channels); rb->close(fd); return PLAY_ERROR; } @@ -3514,7 +3514,7 @@ int play_file(char* filename) samplebits = letoh16(*(uint16_t *)(aud_buf + 34)); if (samplebits != 16) { - rb->splash(2*HZ, true, "Unsupported sample depth: %dbit", samplebits); + rb->splash(2*HZ, "Unsupported sample depth: %dbit", samplebits); rb->close(fd); return PLAY_ERROR; } @@ -3532,7 +3532,7 @@ int play_file(char* filename) case 44100: rate = 9; break; case 48000: rate = 10; break; default: - rb->splash(2*HZ, true, "Unsupported samplerate: %dHz", samplerate); + rb->splash(2*HZ, "Unsupported samplerate: %dHz", samplerate); rb->close(fd); return PLAY_ERROR; } @@ -3655,14 +3655,14 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) if (!parameter) { - rb->splash(HZ, true, "Play WAV file!"); + rb->splash(HZ, "Play WAV file!"); return PLUGIN_OK; } plug_buf = rb->plugin_get_buffer(&buf_size); if (buf_size < 6700) /* needed for i2c transfer */ { - rb->splash(HZ, true, "Out of memory."); + rb->splash(HZ, "Out of memory."); return PLUGIN_ERROR; } diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c index fcfcb35513..22f49e2298 100644 --- a/apps/plugins/wormlet.c +++ b/apps/plugins/wormlet.c @@ -1659,7 +1659,7 @@ static int run(void) cycle_start = *rb->current_tick; } - rb->splash(HZ*2, true, "Game Over!"); + rb->splash(HZ*2, "Game Over!"); return 2; /* back to menu */ } diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c index 5669894c5e..bfbadd2e6c 100644 --- a/apps/plugins/xobox.c +++ b/apps/plugins/xobox.c @@ -573,7 +573,7 @@ static void die (void) player.gameover = true; else { refresh_board (); - rb->splash (HZ, true, "Crash!"); + rb->splash (HZ, "Crash!"); complete_trail (false); player.move = MOVE_NO; player.drawing = false; @@ -700,13 +700,13 @@ static inline void move_board (void) } j = percentage (); if (j > 75) { /* finished level */ - rb->splash (HZ * 2, true, "Level %d finished", player.level+1); + rb->splash (HZ * 2, "Level %d finished", player.level+1); player.score += j; if (player.level < MAX_LEVEL) player.level++; init_board (); refresh_board (); - rb->splash (HZ * 2, true, "Ready?"); + rb->splash (HZ * 2, "Ready?"); } } @@ -785,7 +785,7 @@ static void init_game (void) rb->lcd_setfont(FONT_SYSFIXED); init_board (); refresh_board (); - rb->splash (HZ * 2, true, "Ready?"); + rb->splash (HZ * 2, "Ready?"); } /* general keypad handler loop */ @@ -801,7 +801,7 @@ static int xobox_loop (void) #ifdef HAS_BUTTON_HOLD if (rb->button_hold()) { pause = true; - rb->splash (HZ, true, "PAUSED"); + rb->splash (HZ, "PAUSED"); } #endif @@ -826,7 +826,7 @@ static int xobox_loop (void) case PAUSE: pause = !pause; if (pause) - rb->splash (HZ, true, "Paused"); + rb->splash (HZ, "Paused"); break; case QUIT: ret = game_menu (); @@ -845,7 +845,7 @@ static int xobox_loop (void) refresh_board (); } if (player.gameover) { - rb->splash (HZ, true, "Game Over!"); + rb->splash (HZ, "Game Over!"); ret = game_menu (); if (ret == MENU_START) init_game (); diff --git a/apps/plugins/zxbox/interf.c b/apps/plugins/zxbox/interf.c index 8e39e35d39..7f37262140 100644 --- a/apps/plugins/zxbox/interf.c +++ b/apps/plugins/zxbox/interf.c @@ -95,7 +95,7 @@ char *spif_get_tape_fileinfo(int *startp, int *nump) void put_msg(const char *msg) { #ifndef USE_GRAY - rb->splash (HZ/2,true , msg ); + rb->splash (HZ/2, msg ); #else LOGF(msg); (void)msg; @@ -106,7 +106,7 @@ void put_msg(const char *msg) void put_tmp_msg(const char *msg) { #ifndef USE_GRAY - rb->splash (HZ/10,true , msg ); + rb->splash (HZ/10, msg ); #else LOGF(msg); (void)msg; diff --git a/apps/plugins/zxbox/snapshot.c b/apps/plugins/zxbox/snapshot.c index d89e533d9e..5528b710c2 100644 --- a/apps/plugins/zxbox/snapshot.c +++ b/apps/plugins/zxbox/snapshot.c @@ -651,7 +651,7 @@ void load_snapshot_file_type(char *name, int type) snsh = rb->open(filenamebuf, O_RDONLY); if(snsh < 0) { #ifndef USE_GRAY - rb->splash(HZ,true, "Could not open snapshot file `%s'",filenamebuf); + rb->splash(HZ, "Could not open snapshot file `%s'",filenamebuf); #endif return; } diff --git a/apps/plugins/zxbox/spmain.c b/apps/plugins/zxbox/spmain.c index 20d806eef3..036e28a240 100644 --- a/apps/plugins/zxbox/spmain.c +++ b/apps/plugins/zxbox/spmain.c @@ -297,7 +297,7 @@ static void options_menu(void){ no_yes, 2, NULL); if (new_setting != settings.invert_colors ) settings.invert_colors=new_setting; - rb->splash(HZ, true , "Restart to see effect"); + rb->splash(HZ, "Restart to see effect"); break; case 3: new_setting = settings.frameskip; @@ -467,7 +467,7 @@ static void run_singlemode(void) #ifdef USE_GRAY gray_show(false); #endif - rb->splash(0,true,"Saving settings..."); + rb->splash(0, "Saving settings..."); configfile_save(GLOBALCFG, config,sizeof(config)/sizeof(*config),SETTINGS_VERSION); } @@ -531,7 +531,7 @@ static void init_load(void *parameter) check_params (parameter); if(spcf_init_snapshot != NULL) { #ifndef USE_GRAY - rb->splash(HZ,true, "Loading snapshot '%s'", spcf_init_snapshot); + rb->splash(HZ, "Loading snapshot '%s'", spcf_init_snapshot); #endif load_snapshot_file_type(spcf_init_snapshot, spcf_init_snapshot_type); diff --git a/apps/plugins/zxbox/zxbox.c b/apps/plugins/zxbox/zxbox.c index 5901982004..b85dc01991 100644 --- a/apps/plugins/zxbox/zxbox.c +++ b/apps/plugins/zxbox/zxbox.c @@ -64,7 +64,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb = api; rb->lcd_set_backdrop(NULL); - rb->splash(HZ, true, "Welcome to ZXBox"); + rb->splash(HZ, "Welcome to ZXBox"); sp_init(); diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c index 4762bddb70..47ca978475 100644 --- a/apps/recorder/radio.c +++ b/apps/recorder/radio.c @@ -703,7 +703,7 @@ int radio_screen(void) case ACTION_FM_PRESET: if(num_presets < 1) { - gui_syncsplash(HZ, true, str(LANG_FM_NO_PRESETS)); + gui_syncsplash(HZ, str(LANG_FM_NO_PRESETS)); update_screen = true; FOR_NB_SCREENS(i) { @@ -737,7 +737,7 @@ int radio_screen(void) case ACTION_FM_FREEZE: if(!screen_freeze) { - gui_syncsplash(HZ, true, str(LANG_FM_FREEZE)); + gui_syncsplash(HZ, str(LANG_FM_FREEZE)); screen_freeze = true; } else @@ -931,7 +931,7 @@ int radio_screen(void) #if CONFIG_CODEC != SWCODEC if(audio_status() & AUDIO_STATUS_ERROR) { - gui_syncsplash(0, true, str(LANG_DISK_FULL)); + gui_syncsplash(0, str(LANG_DISK_FULL)); gui_syncstatusbar_draw(&statusbars,true); FOR_NB_SCREENS(i) gui_textarea_update(&screens[i]); @@ -1009,7 +1009,7 @@ static void radio_save_presets(void) } else { - gui_syncsplash(HZ, true, str(LANG_FM_PRESET_SAVE_FAILED)); + gui_syncsplash(HZ, str(LANG_FM_PRESET_SAVE_FAILED)); } } @@ -1095,7 +1095,7 @@ static int radio_add_preset(void) } else { - gui_syncsplash(HZ, true, str(LANG_FM_NO_FREE_PRESETS)); + gui_syncsplash(HZ, str(LANG_FM_NO_FREE_PRESETS)); } return true; } @@ -1183,7 +1183,7 @@ static int save_preset_list(void) if((!p1) || (len > MAX_FILENAME) || (len == 0)) { /* no slash, too long or too short */ - gui_syncsplash(HZ,true,str(LANG_INVALID_FILENAME)); + gui_syncsplash(HZ, str(LANG_INVALID_FILENAME)); } else { @@ -1203,7 +1203,7 @@ static int save_preset_list(void) } } else - gui_syncsplash(HZ,true,str(LANG_FM_NO_PRESETS)); + gui_syncsplash(HZ, str(LANG_FM_NO_PRESETS)); return true; } @@ -1380,7 +1380,7 @@ static int scan_presets(void) freq /= 100; snprintf(buf, MAX_FMPRESET_LEN, str(LANG_FM_SCANNING), freq, frac); - gui_syncsplash(0, true, buf); + gui_syncsplash(0, buf); if(radio_set(RADIO_SCAN_FREQUENCY, curr_freq)) { diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index a80a0df2fc..ffde856612 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c @@ -538,7 +538,7 @@ int rec_create_directory(void) rc = mkdir(rec_base_directory); if(rc < 0 && errno != EEXIST) { - gui_syncsplash(HZ * 2, true, + gui_syncsplash(HZ * 2, "Can't create the %s directory. Error code %d.", rec_base_directory, rc); return -1; @@ -870,7 +870,7 @@ bool recording_screen(bool no_source) screens[1].puts((screens[1].width/w - strlen(buf))/2 + 1, screens[1].height/(h*2) + 1, buf); screens[1].update(); - gui_syncsplash(0, true, str(LANG_REMOTE_LCD_OFF)); + gui_syncsplash(0, str(LANG_REMOTE_LCD_OFF)); } #endif @@ -958,7 +958,7 @@ bool recording_screen(bool no_source) screens[1].puts((screens[1].width/w - strlen(buf))/2 + 1, screens[1].height/(h*2) + 1, buf); screens[1].update(); - gui_syncsplash(0, true, str(LANG_REMOTE_LCD_OFF)); + gui_syncsplash(0, str(LANG_REMOTE_LCD_OFF)); } else { @@ -1741,7 +1741,7 @@ bool recording_screen(bool no_source) audio_stat = audio_status(); if (audio_stat & AUDIO_STATUS_ERROR) { - gui_syncsplash(0, true, str(LANG_SYSFONT_DISK_FULL)); + gui_syncsplash(0, str(LANG_SYSFONT_DISK_FULL)); gui_syncstatusbar_draw(&statusbars, true); FOR_NB_SCREENS(i) diff --git a/apps/root_menu.c b/apps/root_menu.c index 050f5be3c6..75846e3a6c 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c @@ -119,14 +119,14 @@ static int browser(void* param) /* Maybe just needs to reboot due to delayed commit */ if (stat->commit_delayed) { - gui_syncsplash(HZ*2, true, str(LANG_PLEASE_REBOOT)); + gui_syncsplash(HZ*2, str(LANG_PLEASE_REBOOT)); break; } /* Check if ready status is known */ if (!stat->readyvalid) { - gui_syncsplash(0, true, str(LANG_TAGCACHE_BUSY)); + gui_syncsplash(0, str(LANG_TAGCACHE_BUSY)); continue; } @@ -151,13 +151,13 @@ static int browser(void* param) /* Display building progress */ if (stat->commit_step > 0) { - gui_syncsplash(0, true, "%s [%d/%d]", + gui_syncsplash(0, "%s [%d/%d]", str(LANG_TAGCACHE_INIT), stat->commit_step, tagcache_get_max_commit_step()); } else { - gui_syncsplash(0, true, str(LANG_BUILDING_DATABASE), + gui_syncsplash(0, str(LANG_BUILDING_DATABASE), stat->processed_entries); } } @@ -231,7 +231,7 @@ static int wpsscrn(void* param) } else { - gui_syncsplash(HZ*2, true, str(LANG_NOTHING_TO_RESUME)); + gui_syncsplash(HZ*2, str(LANG_NOTHING_TO_RESUME)); } #if LCD_DEPTH > 1 show_main_backdrop(); diff --git a/apps/screens.c b/apps/screens.c index df1eb6a2f8..b078f735af 100644 --- a/apps/screens.c +++ b/apps/screens.c @@ -152,7 +152,7 @@ int mmc_remove_request(void) int i; FOR_NB_SCREENS(i) screens[i].clear_display(); - gui_syncsplash(1, true, str(LANG_REMOVE_MMC)); + gui_syncsplash(1, str(LANG_REMOVE_MMC)); if (global_settings.talk_menu) talk_id(LANG_REMOVE_MMC, false); @@ -778,7 +778,7 @@ bool quick_screen_f3(int button_enter) #if CONFIG_CHARGING || defined(SIMULATOR) void charging_splash(void) { - gui_syncsplash(2*HZ, true, (unsigned char *)str(LANG_BATTERY_CHARGE)); + gui_syncsplash(2*HZ, (unsigned char *)str(LANG_BATTERY_CHARGE)); button_clear_queue(); } #endif @@ -1092,7 +1092,7 @@ bool shutdown_screen(void) lcd_stop_scroll(); - gui_syncsplash(0, true, str(LANG_CONFIRM_SHUTDOWN)); + gui_syncsplash(0, str(LANG_CONFIRM_SHUTDOWN)); while(!done && TIME_BEFORE(current_tick,time_entered+HZ*2)) { diff --git a/apps/settings.c b/apps/settings.c index 0b2f2d9d40..57db619d72 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -596,15 +596,15 @@ bool settings_save_config(int options) break; } else { - gui_syncsplash(HZ, true, str(LANG_MENU_SETTING_CANCEL)); + gui_syncsplash(HZ, str(LANG_MENU_SETTING_CANCEL)); return false; } } if (settings_write_config(filename, options)) - gui_syncsplash(HZ, true, str(LANG_SETTINGS_SAVED)); + gui_syncsplash(HZ, str(LANG_SETTINGS_SAVED)); else - gui_syncsplash(HZ, true, str(LANG_FAILED)); + gui_syncsplash(HZ, str(LANG_FAILED)); return true; } @@ -1142,7 +1142,7 @@ static bool do_set_setting(const unsigned char* string, void *variable, { if (*(int*)variable != oldvalue) { - gui_syncsplash(HZ/2,true,str(LANG_MENU_SETTING_CANCEL)); + gui_syncsplash(HZ/2, str(LANG_MENU_SETTING_CANCEL)); *(int*)variable = oldvalue; } } @@ -1150,7 +1150,7 @@ static bool do_set_setting(const unsigned char* string, void *variable, { if (*(bool*)variable != (bool)oldvalue) { - gui_syncsplash(HZ/2,true,str(LANG_MENU_SETTING_CANCEL)); + gui_syncsplash(HZ/2, str(LANG_MENU_SETTING_CANCEL)); *(bool*)variable = (bool)oldvalue; } } diff --git a/apps/tagtree.c b/apps/tagtree.c index 59be2a857f..fadeeb52e1 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c @@ -673,10 +673,10 @@ static void tagtree_unbuffer_event(struct mp3entry *id3, bool last_track) bool tagtree_export(void) { - gui_syncsplash(0, true, str(LANG_CREATING)); + gui_syncsplash(0, str(LANG_CREATING)); if (!tagcache_create_changelog(&tcs)) { - gui_syncsplash(HZ*2, true, str(LANG_FAILED)); + gui_syncsplash(HZ*2, str(LANG_FAILED)); } return false; @@ -684,10 +684,10 @@ bool tagtree_export(void) bool tagtree_import(void) { - gui_syncsplash(0, true, str(LANG_WAIT)); + gui_syncsplash(0, str(LANG_WAIT)); if (!tagcache_import_changelog()) { - gui_syncsplash(HZ*2, true, str(LANG_FAILED)); + gui_syncsplash(HZ*2, str(LANG_FAILED)); } return false; @@ -882,7 +882,7 @@ static bool show_search_progress(bool init, int count) if (current_tick - last_tick > HZ/4) { - gui_syncsplash(0, true, str(LANG_PLAYLIST_SEARCH_MSG), count, + gui_syncsplash(0, str(LANG_PLAYLIST_SEARCH_MSG), count, #if CONFIG_KEYPAD == PLAYER_PAD str(LANG_STOP_ABORT) #else @@ -1000,7 +1000,7 @@ static int retrieve_entries(struct tree_context *c, struct tagcache_search *tcs, ) { show_search_progress(true, 0); - gui_syncsplash(0, true, str(LANG_PLAYLIST_SEARCH_MSG), + gui_syncsplash(0, str(LANG_PLAYLIST_SEARCH_MSG), 0, csi->name); } @@ -1200,7 +1200,7 @@ static int retrieve_entries(struct tree_context *c, struct tagcache_search *tcs, if (!sort && (sort_inverse || sort_limit)) { - gui_syncsplash(HZ*4, true, str(LANG_SHOWDIR_BUFFER_FULL), total_count); + gui_syncsplash(HZ*4, str(LANG_SHOWDIR_BUFFER_FULL), total_count); logf("Too small dir buffer"); return 0; } @@ -1303,7 +1303,7 @@ int tagtree_load(struct tree_context* c) { c->dirlevel = 0; count = load_root(c); - gui_syncsplash(HZ, true, str(LANG_TAGCACHE_BUSY)); + gui_syncsplash(HZ, str(LANG_TAGCACHE_BUSY)); } /* The _total_ numer of entries available. */ @@ -1468,7 +1468,7 @@ static bool insert_all_playlist(struct tree_context *c, int position, bool queue cpu_boost(true); if (!tagcache_search(&tcs, tag_filename)) { - gui_syncsplash(HZ, true, str(LANG_TAGCACHE_BUSY)); + gui_syncsplash(HZ, str(LANG_TAGCACHE_BUSY)); cpu_boost(false); return false; } @@ -1571,12 +1571,12 @@ bool tagtree_insert_selection_playlist(int position, bool queue) } if (tc->filesindir <= 0) - gui_syncsplash(HZ, true, str(LANG_END_PLAYLIST_PLAYER)); + gui_syncsplash(HZ, str(LANG_END_PLAYLIST_PLAYER)); else { logf("insert_all_playlist"); if (!insert_all_playlist(tc, position, queue)) - gui_syncsplash(HZ*2, true, str(LANG_FAILED)); + gui_syncsplash(HZ*2, str(LANG_FAILED)); } /* Finally return the dirlevel to its original value. */ diff --git a/apps/tree.c b/apps/tree.c index d58c05deb7..a8723a44d5 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -242,10 +242,10 @@ bool check_rockboxdir(void) int i; FOR_NB_SCREENS(i) screens[i].clear_display(); - gui_syncsplash(HZ*2, true, "No .rockbox directory"); + gui_syncsplash(HZ*2, "No .rockbox directory"); FOR_NB_SCREENS(i) screens[i].clear_display(); - gui_syncsplash(HZ*2, true, "Installation incomplete"); + gui_syncsplash(HZ*2, "Installation incomplete"); return false; } closedir(dir); @@ -366,7 +366,7 @@ static int update_dir(void) (tc.dirfull || tc.filesindir == global_settings.max_files_in_dir) ) { - gui_syncsplash(HZ, true, str(LANG_SHOWDIR_BUFFER_FULL)); + gui_syncsplash(HZ, str(LANG_SHOWDIR_BUFFER_FULL)); } } #ifdef HAVE_TAGCACHE @@ -606,7 +606,7 @@ int dirbrowse() if (*tc.dirfilter > NUM_FILTER_MODES && numentries==0) { - gui_syncsplash(HZ*2, true, str(LANG_NO_FILES)); + gui_syncsplash(HZ*2, str(LANG_NO_FILES)); return false; /* No files found for rockbox_browser() */ } -- cgit v1.2.3