1
0
Fork 0
forked from len0rd/rockbox

The splash() function's second argument (keymask) is now removed, as it

was not used by any code.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4201 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Daniel Stenberg 2004-01-08 09:58:58 +00:00
parent fe706d2754
commit 1afa395c2f
18 changed files with 95 additions and 100 deletions

View file

@ -330,7 +330,7 @@ static int insert_data_in_file(char *fname, int fpos, char *buf, int num_bytes)
static void fileerror(int rc)
{
splash(HZ*2, 0, true, "File error: %d", rc);
splash(HZ*2, true, "File error: %d", rc);
}
static const unsigned char empty_id3_header[] =
@ -352,7 +352,7 @@ static bool vbr_fix(void)
int unused_space;
if(mpeg_status()) {
splash(HZ*2, 0, true, str(LANG_VBRFIX_STOP_PLAY));
splash(HZ*2, true, str(LANG_VBRFIX_STOP_PLAY));
return onplay_result;
}
@ -473,7 +473,7 @@ static bool vbr_fix(void)
{
/* Not a VBR file */
DEBUGF("Not a VBR file\n");
splash(HZ*2, 0, true, str(LANG_VBRFIX_NOT_VBR));
splash(HZ*2, true, str(LANG_VBRFIX_NOT_VBR));
}
return false;

View file

@ -238,7 +238,7 @@ static int add_indices_to_playlist(void)
lcd_setmargins(0, 0);
#endif
splash(0, 0, true, str(LANG_PLAYLIST_LOAD));
splash(0, true, str(LANG_PLAYLIST_LOAD));
/* use mp3 buffer for maximum load speed */
buflen = (mp3end - mp3buf);
@ -404,7 +404,7 @@ static int add_track_to_playlist(char *filename, int position, bool queue,
if (result < 0)
{
splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
splash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
return result;
}
}
@ -437,7 +437,7 @@ static int add_directory_to_playlist(char *dirname, int *position, bool queue,
if(!files)
{
splash(HZ*2, 0, true, str(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR));
splash(HZ*2, true, str(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR));
return 0;
}
@ -578,7 +578,7 @@ static int remove_track_from_playlist(int position, bool write)
if (result < 0)
{
splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
splash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
return result;
}
}
@ -824,10 +824,10 @@ static int get_filename(int seek, bool control_file, char *buf,
if (max < 0)
{
if (control_file)
splash(HZ*2, 0, true,
splash(HZ*2, true,
str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
else
splash(HZ*2, 0, true, str(LANG_PLAYLIST_ACCESS_ERROR));
splash(HZ*2, true, str(LANG_PLAYLIST_ACCESS_ERROR));
return max;
}
@ -919,11 +919,13 @@ static void display_playlist_count(int count, char *fmt)
lcd_setmargins(0, 0);
#endif
splash(0, true, fmt, count,
#ifdef HAVE_PLAYER_KEYPAD
splash(0, 0, true, fmt, count, str(LANG_STOP_ABORT));
str(LANG_STOP_ABORT)
#else
splash(0, 0, true, fmt, count, str(LANG_OFF_ABORT));
str(LANG_OFF_ABORT)
#endif
);
}
/*
@ -981,7 +983,7 @@ static int flush_pending_control(void)
if (result < 0)
{
splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
splash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
return result;
}
}
@ -1026,7 +1028,7 @@ int playlist_create(char *dir, char *file)
playlist.control_fd = open(PLAYLIST_CONTROL_FILE, O_RDWR);
if (playlist.control_fd < 0)
splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
splash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
if (!file)
{
@ -1046,7 +1048,7 @@ int playlist_create(char *dir, char *file)
PLAYLIST_CONTROL_FILE_VERSION, dir, file) > 0)
fsync(playlist.control_fd);
else
splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
splash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
}
/* load the playlist file */
@ -1091,7 +1093,7 @@ int playlist_resume(void)
playlist.control_fd = open(PLAYLIST_CONTROL_FILE, O_RDWR);
if (playlist.control_fd < 0)
{
splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
splash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
return -1;
}
@ -1100,7 +1102,7 @@ int playlist_resume(void)
PLAYLIST_COMMAND_SIZE<buflen?PLAYLIST_COMMAND_SIZE:buflen);
if(nread <= 0)
{
splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
splash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
return -1;
}
@ -1375,7 +1377,7 @@ int playlist_resume(void)
if (result < 0)
{
splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_INVALID));
splash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_INVALID));
return result;
}
@ -1458,7 +1460,7 @@ int playlist_insert_track(char *filename, int position, bool queue)
if (playlist.control_fd < 0)
{
splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
splash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
return -1;
}
@ -1485,7 +1487,7 @@ int playlist_insert_directory(char *dirname, int position, bool queue,
if (playlist.control_fd < 0)
{
splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
splash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
return -1;
}
@ -1523,14 +1525,14 @@ int playlist_insert_playlist(char *filename, int position, bool queue)
if (playlist.control_fd < 0)
{
splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
splash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
return -1;
}
fd = open(filename, O_RDONLY);
if (fd < 0)
{
splash(HZ*2, 0, true, str(LANG_PLAYLIST_ACCESS_ERROR));
splash(HZ*2, true, str(LANG_PLAYLIST_ACCESS_ERROR));
return -1;
}
@ -1623,7 +1625,7 @@ int playlist_delete(int index)
if (playlist.control_fd < 0)
{
splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
splash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
return -1;
}
@ -1730,7 +1732,7 @@ int playlist_shuffle(int random_seed, int start_index)
start_current = true;
}
splash(0, 0, true, str(LANG_PLAYLIST_SHUFFLE));
splash(0, true, str(LANG_PLAYLIST_SHUFFLE));
randomise_playlist(random_seed, start_current, true);
@ -1885,7 +1887,7 @@ int playlist_next(int steps)
if (result < 0)
{
splash(HZ*2, 0, true,
splash(HZ*2, true,
str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
return result;
}
@ -1990,7 +1992,7 @@ int playlist_save(char *filename)
if (playlist.control_fd < 0)
{
splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
splash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
return -1;
}
@ -2005,7 +2007,7 @@ int playlist_save(char *filename)
fd = open(tmp_buf, O_CREAT|O_WRONLY|O_TRUNC);
if (fd < 0)
{
splash(HZ*2, 0, true, str(LANG_PLAYLIST_ACCESS_ERROR));
splash(HZ*2, true, str(LANG_PLAYLIST_ACCESS_ERROR));
return -1;
}
@ -2041,7 +2043,7 @@ int playlist_save(char *filename)
if (fprintf(fd, "%s\n", tmp_buf) < 0)
{
splash(HZ*2, 0, true,
splash(HZ*2, true,
str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
result = -1;
break;

View file

@ -652,9 +652,9 @@ bool playlist_viewer(void)
{
/* Play has stopped */
#ifdef HAVE_LCD_CHARCELLS
splash(HZ, 0, true, str(LANG_END_PLAYLIST_PLAYER));
splash(HZ, true, str(LANG_END_PLAYLIST_PLAYER));
#else
splash(HZ, 0, true, str(LANG_END_PLAYLIST_RECORDER));
splash(HZ, true, str(LANG_END_PLAYLIST_RECORDER));
#endif
status_set_playmode(STATUS_STOP);
return false;;
@ -772,7 +772,7 @@ bool playlist_viewer(void)
ret = playlist_move(viewer.move_track,
tracks[INDEX(viewer.cursor_pos)].index);
if (ret < 0)
splash(HZ, 0, true, str(LANG_MOVE_FAILED));
splash(HZ, true, str(LANG_MOVE_FAILED));
update_playlist(true);
viewer.move_track = -1;

View file

@ -191,7 +191,7 @@ int plugin_load(char* plugin, void* parameter)
pd = dlopen(path, RTLD_NOW);
if (!pd) {
snprintf(buf, sizeof buf, "Can't open %s", plugin);
splash(HZ*2, 0, true, buf);
splash(HZ*2, true, buf);
DEBUGF("dlopen(%s): %s\n",path,dlerror());
dlclose(pd);
return -1;
@ -201,7 +201,7 @@ int plugin_load(char* plugin, void* parameter)
if (!plugin_start) {
plugin_start = dlsym(pd, "_plugin_start");
if (!plugin_start) {
splash(HZ*2, 0, true, "Can't find entry point");
splash(HZ*2, true, "Can't find entry point");
dlclose(pd);
return -1;
}
@ -210,7 +210,7 @@ int plugin_load(char* plugin, void* parameter)
fd = open(plugin, O_RDONLY);
if (fd < 0) {
snprintf(buf, sizeof buf, str(LANG_PLUGIN_CANT_OPEN), plugin);
splash(HZ*2, 0, true, buf);
splash(HZ*2, true, buf);
return fd;
}
@ -220,12 +220,12 @@ int plugin_load(char* plugin, void* parameter)
if (plugin_size < 0) {
/* read error */
snprintf(buf, sizeof buf, str(LANG_READ_FAILED), plugin);
splash(HZ*2, 0, true, buf);
splash(HZ*2, true, buf);
return -1;
}
if (plugin_size == 0) {
/* loaded a 0-byte plugin, implying it's not for this model */
splash(HZ*2, 0, true, str(LANG_PLUGIN_WRONG_MODEL));
splash(HZ*2, true, str(LANG_PLUGIN_WRONG_MODEL));
return -1;
}
#endif
@ -242,15 +242,15 @@ int plugin_load(char* plugin, void* parameter)
return PLUGIN_USB_CONNECTED;
case PLUGIN_WRONG_API_VERSION:
splash(HZ*2, 0, true, str(LANG_PLUGIN_WRONG_VERSION));
splash(HZ*2, true, str(LANG_PLUGIN_WRONG_VERSION));
break;
case PLUGIN_WRONG_MODEL:
splash(HZ*2, 0, true, str(LANG_PLUGIN_WRONG_MODEL));
splash(HZ*2, true, str(LANG_PLUGIN_WRONG_MODEL));
break;
default:
splash(HZ*2, 0, true, str(LANG_PLUGIN_ERROR));
splash(HZ*2, true, str(LANG_PLUGIN_ERROR));
break;
}

View file

@ -173,7 +173,7 @@ struct plugin_api {
/* misc */
void (*srand)(unsigned int seed);
int (*rand)(void);
void (*splash)(int ticks, int keymask, bool center, char *fmt, ...);
void (*splash)(int ticks, bool center, char *fmt, ...);
void (*qsort)(void *base, size_t nmemb, size_t size,
int(*compar)(const void *, const void *));
int (*kbd_input)(char* buffer, int buflen);

View file

@ -65,7 +65,7 @@ void save_settings(void)
}
else
{
rb->splash(HZ, 0, true, "Setting save failed");
rb->splash(HZ, true, "Setting save failed");
}
}
@ -83,7 +83,7 @@ void load_settings(void)
/* Else, loading failed */
else
{
rb->splash(HZ, 0, true, "Setting load failed, using default settings.");
rb->splash(HZ, true, "Setting load failed, using default settings.");
}
}
@ -121,7 +121,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
load_settings();
rb->lcd_clear_display();
rb->splash(HZ, 0, true, "F1 for INFO");
rb->splash(HZ, true, "F1 for INFO");
while (!PLUGIN_OK)
{
@ -324,11 +324,11 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
/* Tell the user what's going on */
rb->lcd_clear_display();
rb->splash(HZ/2, 0, true, "Saving settings...");
rb->splash(HZ/2, true, "Saving settings...");
/* Save to disk */
save_settings();
rb->lcd_clear_display();
rb->splash(HZ, 0, true, "Saved!");
rb->splash(HZ, true, "Saved!");
/* ...and exit. */
return PLUGIN_OK;
break;

View file

@ -22,7 +22,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
id3 = rb->mpeg_current_track();
if (!id3) {
rb->splash(HZ*2, 0, true, "Nothing To Save");
rb->splash(HZ*2, true, "Nothing To Save");
return PLUGIN_OK;
}
@ -45,7 +45,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
rb->close(fd);
}
rb->splash(HZ*2, 0, true, "Saved Favorite");
rb->splash(HZ*2, true, "Saved Favorite");
return PLUGIN_OK;
}

View file

@ -611,7 +611,7 @@ void DoUserDialog(char* filename)
/* test if the user is running the correct plugin for this box */
if (!CheckPlatform(PLATFORM_ID, *(UINT16*)(FB + VERSION_ADR)))
{
rb->splash(HZ*3, 0, true, "Wrong plugin");
rb->splash(HZ*3, true, "Wrong plugin");
return; /* exit */
}
@ -619,7 +619,7 @@ void DoUserDialog(char* filename)
result = CheckBootROM();
if (result == eUnknown)
{ /* no support for any other yet */
rb->splash(HZ*3, 0, true, "Wrong boot ROM");
rb->splash(HZ*3, true, "Wrong boot ROM");
return; /* exit */
}
is_romless = (result == eROMless);
@ -640,7 +640,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, 0, true, "Out of memory");
rb->splash(HZ*3, true, "Out of memory");
return; /* exit */
}
@ -648,7 +648,7 @@ void DoUserDialog(char* filename)
ShowFlashInfo(&FlashInfo);
if (FlashInfo.size == 0) /* no valid chip */
{
rb->splash(HZ*3, 0, true, "Sorry!");
rb->splash(HZ*3, true, "Sorry!");
return; /* exit */
}
@ -832,7 +832,7 @@ void DoUserDialog(char* filename)
/* test if the user is running the correct plugin for this box */
if (!CheckPlatform(PLATFORM_ID, *(UINT16*)(FB + VERSION_ADR)))
{
rb->splash(HZ*3, 0, true, "Wrong version");
rb->splash(HZ*3, true, "Wrong version");
return; /* exit */
}
@ -840,7 +840,7 @@ void DoUserDialog(char* filename)
result = CheckBootROM();
if (result == eUnknown)
{ /* no support for any other yet */
rb->splash(HZ*3, 0, true, "Wrong boot ROM");
rb->splash(HZ*3, true, "Wrong boot ROM");
return; /* exit */
}
is_romless = (result == eROMless);
@ -861,7 +861,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, 0, true, "Out of memory");
rb->splash(HZ*3, true, "Out of memory");
return; /* exit */
}

View file

@ -42,7 +42,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
rb = api;
/* now go ahead and have fun! */
rb->splash(HZ*2, 0, true, "Hello world!");
rb->splash(HZ*2, true, "Hello world!");
return PLUGIN_OK;
}

View file

@ -525,7 +525,7 @@ void DoUserDialog(char* filename, bool show_greet)
sector = rb->plugin_get_buffer(&memleft);
if (memleft < SECTORSIZE) /* need buffer for a flash sector */
{
rb->splash(HZ*3, 0, true, "Out of memory");
rb->splash(HZ*3, true, "Out of memory");
return; /* exit */
}
@ -537,12 +537,12 @@ void DoUserDialog(char* filename, bool show_greet)
if (FlashInfo.size == 0) /* no valid chip */
{
rb->splash(HZ*3, 0, true, "Not flashable");
rb->splash(HZ*3, true, "Not flashable");
return; /* exit */
}
else if (pos == 0)
{
rb->splash(HZ*3, 0, true, "No image");
rb->splash(HZ*3, true, "No image");
return; /* exit */
}
@ -701,7 +701,7 @@ void DoUserDialog(char* filename, bool show_greet)
sector = rb->plugin_get_buffer(&memleft);
if (memleft < SECTORSIZE) /* need buffer for a flash sector */
{
rb->splash(HZ*3, 0, true, "Out of memory");
rb->splash(HZ*3, true, "Out of memory");
return; /* exit */
}
@ -716,12 +716,12 @@ void DoUserDialog(char* filename, bool show_greet)
if (FlashInfo.size == 0) /* no valid chip */
{
rb->splash(HZ*3, 0, true, "Not flashable");
rb->splash(HZ*3, true, "Not flashable");
return; /* exit */
}
else if (pos == 0)
{
rb->splash(HZ*3, 0, true, "No image");
rb->splash(HZ*3, true, "No image");
return; /* exit */
}

View file

@ -241,7 +241,7 @@ static int get_level_count(void)
char buffer[COLS + 3]; /* COLS plus CR/LF and \0 */
if ((fd = rb->open(LEVELS_FILE, O_RDONLY)) < 0) {
rb->splash(0, 0, true, "Unable to open %s", LEVELS_FILE);
rb->splash(0, true, "Unable to open %s", LEVELS_FILE);
return -1;
}
@ -858,7 +858,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
init_boards();
if (get_level_count() != 0) {
rb->splash(HZ*2,0,true,"Failed loading levels!");
rb->splash(HZ*2, true, "Failed loading levels!");
return PLUGIN_OK;
}

View file

@ -340,7 +340,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
if (parameter == NULL)
{
rb->splash(HZ*2, 0, true, "Play .rvf file!");
rb->splash(HZ*2, true, "Play .rvf file!");
return PLUGIN_ERROR;
}

View file

@ -662,8 +662,9 @@ static int viewer_recorder_on_button(int col)
if (++page_mode == PAGE_MODES)
page_mode = 0;
rb->splash(HZ, 0, true, "%s %s",
page_mode_str[page_mode], page_mode_str[PAGE_MODES]);
rb->splash(HZ, true, "%s %s",
page_mode_str[page_mode],
page_mode_str[PAGE_MODES]);
viewer_draw(col);
break;
@ -677,10 +678,11 @@ static int viewer_recorder_on_button(int col)
init_need_scrollbar();
viewer_draw(col);
rb->splash(HZ, 0, true, "%s %s (%s %s)",
scrollbar_mode_str[SCROLLBAR_MODES],
scrollbar_mode_str[scrollbar_mode[view_mode]],
view_mode_str[view_mode], view_mode_str[VIEW_MODES]);
rb->splash(HZ, true, "%s %s (%s %s)",
scrollbar_mode_str[SCROLLBAR_MODES],
scrollbar_mode_str[scrollbar_mode[view_mode]],
view_mode_str[view_mode],
view_mode_str[VIEW_MODES]);
}
viewer_draw(col);
break;
@ -744,7 +746,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file)
ok = viewer_init(file);
if (!ok) {
rb->splash(HZ, 0, false, "Error");
rb->splash(HZ, false, "Error");
viewer_exit();
return PLUGIN_OK;
}
@ -776,8 +778,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file)
#endif
viewer_draw(col);
rb->splash(HZ, 0, true, "%s %s",
word_mode_str[word_mode], word_mode_str[WORD_MODES]);
rb->splash(HZ, true, "%s %s",
word_mode_str[word_mode],
word_mode_str[WORD_MODES]);
viewer_draw(col);
break;
@ -801,8 +804,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file)
#endif
viewer_draw(col);
rb->splash(HZ, 0, true, "%s %s",
line_mode_str[line_mode], line_mode_str[LINE_MODES]);
rb->splash(HZ, true, "%s %s",
line_mode_str[line_mode],
line_mode_str[LINE_MODES]);
viewer_draw(col);
break;
@ -814,8 +818,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file)
#endif
/* View-width mode: NARROW or WIDE */
if (line_mode == JOIN)
rb->splash(HZ, 0, true, "(no %s %s)",
view_mode_str[WIDE], line_mode_str[JOIN]);
rb->splash(HZ, true, "(no %s %s)",
view_mode_str[WIDE],
line_mode_str[JOIN]);
else
if (++view_mode == VIEW_MODES)
view_mode = 0;
@ -840,8 +845,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file)
#endif
viewer_draw(col);
rb->splash(HZ, 0, true, "%s %s",
view_mode_str[view_mode], view_mode_str[VIEW_MODES]);
rb->splash(HZ, true, "%s %s",
view_mode_str[view_mode],
view_mode_str[VIEW_MODES]);
viewer_draw(col);
break;

View file

@ -504,7 +504,7 @@ bool recording_screen(void)
if(mpeg_status() & MPEG_STATUS_ERROR)
{
status_set_playmode(STATUS_STOP);
splash(0, 0, true, str(LANG_DISK_FULL));
splash(0, true, str(LANG_DISK_FULL));
status_draw(true);
lcd_update();
mpeg_error_clear();

View file

@ -673,8 +673,7 @@ bool f3_screen(void)
#define MAXLINES 2
#endif
void splash(int ticks, /* how long */
int keymask, /* what keymask aborts the waiting (if any) */
void splash(int ticks, /* how long the splash is displayed */
bool center, /* FALSE means left-justified, TRUE means
horizontal and vertical center */
char *fmt, /* what to say *printf style */
@ -813,24 +812,13 @@ void splash(int ticks, /* how long */
}
lcd_update();
if(ticks) {
if(keymask) {
int start = current_tick;
int done = ticks + current_tick + 1;
while (TIME_BEFORE( current_tick, done)) {
int button = button_get_w_tmo(ticks - (current_tick-start));
if((button & keymask) == keymask)
break;
}
}
else
/* unbreakable! */
sleep(ticks);
}
if(ticks)
/* unbreakable! */
sleep(ticks);
}
void charging_splash(void)
{
splash(2*HZ, 0, true, str(LANG_BATTERY_CHARGE));
splash(2*HZ, true, str(LANG_BATTERY_CHARGE));
while (button_get(false));
}

View file

@ -31,7 +31,6 @@ bool f3_screen(void);
#endif
void splash(int ticks, /* how long */
int keymask,/* what keymask aborts the waiting (if any) */
bool center, /* FALSE means left-justified, TRUE means
horizontal and vertical center */
char *fmt, /* what to say *printf style */

View file

@ -861,7 +861,7 @@ static bool dirbrowse(char *root, int *dirfilter)
if (*dirfilter > NUM_FILTER_MODES && numentries==0)
{
splash(HZ*2, 0, true, str(LANG_NO_FILES));
splash(HZ*2, true, str(LANG_NO_FILES));
return false; /* No files found for rockbox_browser() */
}
@ -1060,7 +1060,7 @@ static bool dirbrowse(char *root, int *dirfilter)
if(!lang_load(buf)) {
set_file(buf, global_settings.lang_file,
MAX_FILENAME);
splash(HZ, 0, true, str(LANG_LANGUAGE_LOADED));
splash(HZ, true, str(LANG_LANGUAGE_LOADED));
restore = true;
}
break;

View file

@ -125,7 +125,7 @@ void display_keylock_text(bool locked)
else
s = str(LANG_KEYLOCK_OFF_RECORDER);
#endif
splash(HZ, 0, true, s);
splash(HZ, true, s);
}
void display_mute_text(bool muted)