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:
parent
fe706d2754
commit
1afa395c2f
18 changed files with 95 additions and 100 deletions
|
@ -330,7 +330,7 @@ static int insert_data_in_file(char *fname, int fpos, char *buf, int num_bytes)
|
||||||
|
|
||||||
static void fileerror(int rc)
|
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[] =
|
static const unsigned char empty_id3_header[] =
|
||||||
|
@ -352,7 +352,7 @@ static bool vbr_fix(void)
|
||||||
int unused_space;
|
int unused_space;
|
||||||
|
|
||||||
if(mpeg_status()) {
|
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;
|
return onplay_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -473,7 +473,7 @@ static bool vbr_fix(void)
|
||||||
{
|
{
|
||||||
/* Not a VBR file */
|
/* Not a VBR file */
|
||||||
DEBUGF("Not a VBR file\n");
|
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;
|
return false;
|
||||||
|
|
|
@ -238,7 +238,7 @@ static int add_indices_to_playlist(void)
|
||||||
lcd_setmargins(0, 0);
|
lcd_setmargins(0, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
splash(0, 0, true, str(LANG_PLAYLIST_LOAD));
|
splash(0, true, str(LANG_PLAYLIST_LOAD));
|
||||||
|
|
||||||
/* use mp3 buffer for maximum load speed */
|
/* use mp3 buffer for maximum load speed */
|
||||||
buflen = (mp3end - mp3buf);
|
buflen = (mp3end - mp3buf);
|
||||||
|
@ -404,7 +404,7 @@ static int add_track_to_playlist(char *filename, int position, bool queue,
|
||||||
|
|
||||||
if (result < 0)
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -437,7 +437,7 @@ static int add_directory_to_playlist(char *dirname, int *position, bool queue,
|
||||||
|
|
||||||
if(!files)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -578,7 +578,7 @@ static int remove_track_from_playlist(int position, bool write)
|
||||||
|
|
||||||
if (result < 0)
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -824,10 +824,10 @@ static int get_filename(int seek, bool control_file, char *buf,
|
||||||
if (max < 0)
|
if (max < 0)
|
||||||
{
|
{
|
||||||
if (control_file)
|
if (control_file)
|
||||||
splash(HZ*2, 0, true,
|
splash(HZ*2, true,
|
||||||
str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
|
str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
|
||||||
else
|
else
|
||||||
splash(HZ*2, 0, true, str(LANG_PLAYLIST_ACCESS_ERROR));
|
splash(HZ*2, true, str(LANG_PLAYLIST_ACCESS_ERROR));
|
||||||
|
|
||||||
return max;
|
return max;
|
||||||
}
|
}
|
||||||
|
@ -919,11 +919,13 @@ static void display_playlist_count(int count, char *fmt)
|
||||||
lcd_setmargins(0, 0);
|
lcd_setmargins(0, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
splash(0, true, fmt, count,
|
||||||
#ifdef HAVE_PLAYER_KEYPAD
|
#ifdef HAVE_PLAYER_KEYPAD
|
||||||
splash(0, 0, true, fmt, count, str(LANG_STOP_ABORT));
|
str(LANG_STOP_ABORT)
|
||||||
#else
|
#else
|
||||||
splash(0, 0, true, fmt, count, str(LANG_OFF_ABORT));
|
str(LANG_OFF_ABORT)
|
||||||
#endif
|
#endif
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -981,7 +983,7 @@ static int flush_pending_control(void)
|
||||||
|
|
||||||
if (result < 0)
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1026,7 +1028,7 @@ int playlist_create(char *dir, char *file)
|
||||||
|
|
||||||
playlist.control_fd = open(PLAYLIST_CONTROL_FILE, O_RDWR);
|
playlist.control_fd = open(PLAYLIST_CONTROL_FILE, O_RDWR);
|
||||||
if (playlist.control_fd < 0)
|
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)
|
if (!file)
|
||||||
{
|
{
|
||||||
|
@ -1046,7 +1048,7 @@ int playlist_create(char *dir, char *file)
|
||||||
PLAYLIST_CONTROL_FILE_VERSION, dir, file) > 0)
|
PLAYLIST_CONTROL_FILE_VERSION, dir, file) > 0)
|
||||||
fsync(playlist.control_fd);
|
fsync(playlist.control_fd);
|
||||||
else
|
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 */
|
/* load the playlist file */
|
||||||
|
@ -1091,7 +1093,7 @@ int playlist_resume(void)
|
||||||
playlist.control_fd = open(PLAYLIST_CONTROL_FILE, O_RDWR);
|
playlist.control_fd = open(PLAYLIST_CONTROL_FILE, O_RDWR);
|
||||||
if (playlist.control_fd < 0)
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1100,7 +1102,7 @@ int playlist_resume(void)
|
||||||
PLAYLIST_COMMAND_SIZE<buflen?PLAYLIST_COMMAND_SIZE:buflen);
|
PLAYLIST_COMMAND_SIZE<buflen?PLAYLIST_COMMAND_SIZE:buflen);
|
||||||
if(nread <= 0)
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1375,7 +1377,7 @@ int playlist_resume(void)
|
||||||
|
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
{
|
{
|
||||||
splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_INVALID));
|
splash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_INVALID));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1458,7 +1460,7 @@ int playlist_insert_track(char *filename, int position, bool queue)
|
||||||
|
|
||||||
if (playlist.control_fd < 0)
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1485,7 +1487,7 @@ int playlist_insert_directory(char *dirname, int position, bool queue,
|
||||||
|
|
||||||
if (playlist.control_fd < 0)
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1523,14 +1525,14 @@ int playlist_insert_playlist(char *filename, int position, bool queue)
|
||||||
|
|
||||||
if (playlist.control_fd < 0)
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fd = open(filename, O_RDONLY);
|
fd = open(filename, O_RDONLY);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
{
|
{
|
||||||
splash(HZ*2, 0, true, str(LANG_PLAYLIST_ACCESS_ERROR));
|
splash(HZ*2, true, str(LANG_PLAYLIST_ACCESS_ERROR));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1623,7 +1625,7 @@ int playlist_delete(int index)
|
||||||
|
|
||||||
if (playlist.control_fd < 0)
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1730,7 +1732,7 @@ int playlist_shuffle(int random_seed, int start_index)
|
||||||
start_current = true;
|
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);
|
randomise_playlist(random_seed, start_current, true);
|
||||||
|
|
||||||
|
@ -1885,7 +1887,7 @@ int playlist_next(int steps)
|
||||||
|
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
{
|
{
|
||||||
splash(HZ*2, 0, true,
|
splash(HZ*2, true,
|
||||||
str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
|
str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -1990,7 +1992,7 @@ int playlist_save(char *filename)
|
||||||
|
|
||||||
if (playlist.control_fd < 0)
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2005,7 +2007,7 @@ int playlist_save(char *filename)
|
||||||
fd = open(tmp_buf, O_CREAT|O_WRONLY|O_TRUNC);
|
fd = open(tmp_buf, O_CREAT|O_WRONLY|O_TRUNC);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
{
|
{
|
||||||
splash(HZ*2, 0, true, str(LANG_PLAYLIST_ACCESS_ERROR));
|
splash(HZ*2, true, str(LANG_PLAYLIST_ACCESS_ERROR));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2041,7 +2043,7 @@ int playlist_save(char *filename)
|
||||||
|
|
||||||
if (fprintf(fd, "%s\n", tmp_buf) < 0)
|
if (fprintf(fd, "%s\n", tmp_buf) < 0)
|
||||||
{
|
{
|
||||||
splash(HZ*2, 0, true,
|
splash(HZ*2, true,
|
||||||
str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
|
str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
|
||||||
result = -1;
|
result = -1;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -652,9 +652,9 @@ bool playlist_viewer(void)
|
||||||
{
|
{
|
||||||
/* Play has stopped */
|
/* Play has stopped */
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
splash(HZ, 0, true, str(LANG_END_PLAYLIST_PLAYER));
|
splash(HZ, true, str(LANG_END_PLAYLIST_PLAYER));
|
||||||
#else
|
#else
|
||||||
splash(HZ, 0, true, str(LANG_END_PLAYLIST_RECORDER));
|
splash(HZ, true, str(LANG_END_PLAYLIST_RECORDER));
|
||||||
#endif
|
#endif
|
||||||
status_set_playmode(STATUS_STOP);
|
status_set_playmode(STATUS_STOP);
|
||||||
return false;;
|
return false;;
|
||||||
|
@ -772,7 +772,7 @@ bool playlist_viewer(void)
|
||||||
ret = playlist_move(viewer.move_track,
|
ret = playlist_move(viewer.move_track,
|
||||||
tracks[INDEX(viewer.cursor_pos)].index);
|
tracks[INDEX(viewer.cursor_pos)].index);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
splash(HZ, 0, true, str(LANG_MOVE_FAILED));
|
splash(HZ, true, str(LANG_MOVE_FAILED));
|
||||||
|
|
||||||
update_playlist(true);
|
update_playlist(true);
|
||||||
viewer.move_track = -1;
|
viewer.move_track = -1;
|
||||||
|
|
|
@ -191,7 +191,7 @@ int plugin_load(char* plugin, void* parameter)
|
||||||
pd = dlopen(path, RTLD_NOW);
|
pd = dlopen(path, RTLD_NOW);
|
||||||
if (!pd) {
|
if (!pd) {
|
||||||
snprintf(buf, sizeof buf, "Can't open %s", plugin);
|
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());
|
DEBUGF("dlopen(%s): %s\n",path,dlerror());
|
||||||
dlclose(pd);
|
dlclose(pd);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -201,7 +201,7 @@ int plugin_load(char* plugin, void* parameter)
|
||||||
if (!plugin_start) {
|
if (!plugin_start) {
|
||||||
plugin_start = dlsym(pd, "_plugin_start");
|
plugin_start = dlsym(pd, "_plugin_start");
|
||||||
if (!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);
|
dlclose(pd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -210,7 +210,7 @@ int plugin_load(char* plugin, void* parameter)
|
||||||
fd = open(plugin, O_RDONLY);
|
fd = open(plugin, O_RDONLY);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
snprintf(buf, sizeof buf, str(LANG_PLUGIN_CANT_OPEN), plugin);
|
snprintf(buf, sizeof buf, str(LANG_PLUGIN_CANT_OPEN), plugin);
|
||||||
splash(HZ*2, 0, true, buf);
|
splash(HZ*2, true, buf);
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,12 +220,12 @@ int plugin_load(char* plugin, void* parameter)
|
||||||
if (plugin_size < 0) {
|
if (plugin_size < 0) {
|
||||||
/* read error */
|
/* read error */
|
||||||
snprintf(buf, sizeof buf, str(LANG_READ_FAILED), plugin);
|
snprintf(buf, sizeof buf, str(LANG_READ_FAILED), plugin);
|
||||||
splash(HZ*2, 0, true, buf);
|
splash(HZ*2, true, buf);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (plugin_size == 0) {
|
if (plugin_size == 0) {
|
||||||
/* loaded a 0-byte plugin, implying it's not for this model */
|
/* 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;
|
return -1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -242,15 +242,15 @@ int plugin_load(char* plugin, void* parameter)
|
||||||
return PLUGIN_USB_CONNECTED;
|
return PLUGIN_USB_CONNECTED;
|
||||||
|
|
||||||
case PLUGIN_WRONG_API_VERSION:
|
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;
|
break;
|
||||||
|
|
||||||
case PLUGIN_WRONG_MODEL:
|
case PLUGIN_WRONG_MODEL:
|
||||||
splash(HZ*2, 0, true, str(LANG_PLUGIN_WRONG_MODEL));
|
splash(HZ*2, true, str(LANG_PLUGIN_WRONG_MODEL));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
splash(HZ*2, 0, true, str(LANG_PLUGIN_ERROR));
|
splash(HZ*2, true, str(LANG_PLUGIN_ERROR));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,7 @@ struct plugin_api {
|
||||||
/* misc */
|
/* misc */
|
||||||
void (*srand)(unsigned int seed);
|
void (*srand)(unsigned int seed);
|
||||||
int (*rand)(void);
|
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,
|
void (*qsort)(void *base, size_t nmemb, size_t size,
|
||||||
int(*compar)(const void *, const void *));
|
int(*compar)(const void *, const void *));
|
||||||
int (*kbd_input)(char* buffer, int buflen);
|
int (*kbd_input)(char* buffer, int buflen);
|
||||||
|
|
|
@ -65,7 +65,7 @@ void save_settings(void)
|
||||||
}
|
}
|
||||||
else
|
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, loading failed */
|
||||||
else
|
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();
|
load_settings();
|
||||||
|
|
||||||
rb->lcd_clear_display();
|
rb->lcd_clear_display();
|
||||||
rb->splash(HZ, 0, true, "F1 for INFO");
|
rb->splash(HZ, true, "F1 for INFO");
|
||||||
|
|
||||||
while (!PLUGIN_OK)
|
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 */
|
/* Tell the user what's going on */
|
||||||
rb->lcd_clear_display();
|
rb->lcd_clear_display();
|
||||||
rb->splash(HZ/2, 0, true, "Saving settings...");
|
rb->splash(HZ/2, true, "Saving settings...");
|
||||||
/* Save to disk */
|
/* Save to disk */
|
||||||
save_settings();
|
save_settings();
|
||||||
rb->lcd_clear_display();
|
rb->lcd_clear_display();
|
||||||
rb->splash(HZ, 0, true, "Saved!");
|
rb->splash(HZ, true, "Saved!");
|
||||||
/* ...and exit. */
|
/* ...and exit. */
|
||||||
return PLUGIN_OK;
|
return PLUGIN_OK;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -22,7 +22,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
||||||
|
|
||||||
id3 = rb->mpeg_current_track();
|
id3 = rb->mpeg_current_track();
|
||||||
if (!id3) {
|
if (!id3) {
|
||||||
rb->splash(HZ*2, 0, true, "Nothing To Save");
|
rb->splash(HZ*2, true, "Nothing To Save");
|
||||||
return PLUGIN_OK;
|
return PLUGIN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
||||||
rb->close(fd);
|
rb->close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
rb->splash(HZ*2, 0, true, "Saved Favorite");
|
rb->splash(HZ*2, true, "Saved Favorite");
|
||||||
|
|
||||||
return PLUGIN_OK;
|
return PLUGIN_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -611,7 +611,7 @@ void DoUserDialog(char* filename)
|
||||||
/* test if the user is running the correct plugin for this box */
|
/* test if the user is running the correct plugin for this box */
|
||||||
if (!CheckPlatform(PLATFORM_ID, *(UINT16*)(FB + VERSION_ADR)))
|
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 */
|
return; /* exit */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -619,7 +619,7 @@ void DoUserDialog(char* filename)
|
||||||
result = CheckBootROM();
|
result = CheckBootROM();
|
||||||
if (result == eUnknown)
|
if (result == eUnknown)
|
||||||
{ /* no support for any other yet */
|
{ /* 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 */
|
return; /* exit */
|
||||||
}
|
}
|
||||||
is_romless = (result == eROMless);
|
is_romless = (result == eROMless);
|
||||||
|
@ -640,7 +640,7 @@ void DoUserDialog(char* filename)
|
||||||
sector = rb->plugin_get_buffer(&memleft);
|
sector = rb->plugin_get_buffer(&memleft);
|
||||||
if (memleft < SEC_SIZE) /* need buffer for a flash sector */
|
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 */
|
return; /* exit */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -648,7 +648,7 @@ void DoUserDialog(char* filename)
|
||||||
ShowFlashInfo(&FlashInfo);
|
ShowFlashInfo(&FlashInfo);
|
||||||
if (FlashInfo.size == 0) /* no valid chip */
|
if (FlashInfo.size == 0) /* no valid chip */
|
||||||
{
|
{
|
||||||
rb->splash(HZ*3, 0, true, "Sorry!");
|
rb->splash(HZ*3, true, "Sorry!");
|
||||||
return; /* exit */
|
return; /* exit */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -832,7 +832,7 @@ void DoUserDialog(char* filename)
|
||||||
/* test if the user is running the correct plugin for this box */
|
/* test if the user is running the correct plugin for this box */
|
||||||
if (!CheckPlatform(PLATFORM_ID, *(UINT16*)(FB + VERSION_ADR)))
|
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 */
|
return; /* exit */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -840,7 +840,7 @@ void DoUserDialog(char* filename)
|
||||||
result = CheckBootROM();
|
result = CheckBootROM();
|
||||||
if (result == eUnknown)
|
if (result == eUnknown)
|
||||||
{ /* no support for any other yet */
|
{ /* 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 */
|
return; /* exit */
|
||||||
}
|
}
|
||||||
is_romless = (result == eROMless);
|
is_romless = (result == eROMless);
|
||||||
|
@ -861,7 +861,7 @@ void DoUserDialog(char* filename)
|
||||||
sector = rb->plugin_get_buffer(&memleft);
|
sector = rb->plugin_get_buffer(&memleft);
|
||||||
if (memleft < SEC_SIZE) /* need buffer for a flash sector */
|
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 */
|
return; /* exit */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
||||||
rb = api;
|
rb = api;
|
||||||
|
|
||||||
/* now go ahead and have fun! */
|
/* now go ahead and have fun! */
|
||||||
rb->splash(HZ*2, 0, true, "Hello world!");
|
rb->splash(HZ*2, true, "Hello world!");
|
||||||
|
|
||||||
return PLUGIN_OK;
|
return PLUGIN_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -525,7 +525,7 @@ void DoUserDialog(char* filename, bool show_greet)
|
||||||
sector = rb->plugin_get_buffer(&memleft);
|
sector = rb->plugin_get_buffer(&memleft);
|
||||||
if (memleft < SECTORSIZE) /* need buffer for a flash sector */
|
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 */
|
return; /* exit */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -537,12 +537,12 @@ void DoUserDialog(char* filename, bool show_greet)
|
||||||
|
|
||||||
if (FlashInfo.size == 0) /* no valid chip */
|
if (FlashInfo.size == 0) /* no valid chip */
|
||||||
{
|
{
|
||||||
rb->splash(HZ*3, 0, true, "Not flashable");
|
rb->splash(HZ*3, true, "Not flashable");
|
||||||
return; /* exit */
|
return; /* exit */
|
||||||
}
|
}
|
||||||
else if (pos == 0)
|
else if (pos == 0)
|
||||||
{
|
{
|
||||||
rb->splash(HZ*3, 0, true, "No image");
|
rb->splash(HZ*3, true, "No image");
|
||||||
return; /* exit */
|
return; /* exit */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -701,7 +701,7 @@ void DoUserDialog(char* filename, bool show_greet)
|
||||||
sector = rb->plugin_get_buffer(&memleft);
|
sector = rb->plugin_get_buffer(&memleft);
|
||||||
if (memleft < SECTORSIZE) /* need buffer for a flash sector */
|
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 */
|
return; /* exit */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -716,12 +716,12 @@ void DoUserDialog(char* filename, bool show_greet)
|
||||||
|
|
||||||
if (FlashInfo.size == 0) /* no valid chip */
|
if (FlashInfo.size == 0) /* no valid chip */
|
||||||
{
|
{
|
||||||
rb->splash(HZ*3, 0, true, "Not flashable");
|
rb->splash(HZ*3, true, "Not flashable");
|
||||||
return; /* exit */
|
return; /* exit */
|
||||||
}
|
}
|
||||||
else if (pos == 0)
|
else if (pos == 0)
|
||||||
{
|
{
|
||||||
rb->splash(HZ*3, 0, true, "No image");
|
rb->splash(HZ*3, true, "No image");
|
||||||
return; /* exit */
|
return; /* exit */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -241,7 +241,7 @@ static int get_level_count(void)
|
||||||
char buffer[COLS + 3]; /* COLS plus CR/LF and \0 */
|
char buffer[COLS + 3]; /* COLS plus CR/LF and \0 */
|
||||||
|
|
||||||
if ((fd = rb->open(LEVELS_FILE, O_RDONLY)) < 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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -858,7 +858,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
||||||
init_boards();
|
init_boards();
|
||||||
|
|
||||||
if (get_level_count() != 0) {
|
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;
|
return PLUGIN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -340,7 +340,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
||||||
|
|
||||||
if (parameter == NULL)
|
if (parameter == NULL)
|
||||||
{
|
{
|
||||||
rb->splash(HZ*2, 0, true, "Play .rvf file!");
|
rb->splash(HZ*2, true, "Play .rvf file!");
|
||||||
return PLUGIN_ERROR;
|
return PLUGIN_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -662,8 +662,9 @@ static int viewer_recorder_on_button(int col)
|
||||||
if (++page_mode == PAGE_MODES)
|
if (++page_mode == PAGE_MODES)
|
||||||
page_mode = 0;
|
page_mode = 0;
|
||||||
|
|
||||||
rb->splash(HZ, 0, true, "%s %s",
|
rb->splash(HZ, true, "%s %s",
|
||||||
page_mode_str[page_mode], page_mode_str[PAGE_MODES]);
|
page_mode_str[page_mode],
|
||||||
|
page_mode_str[PAGE_MODES]);
|
||||||
|
|
||||||
viewer_draw(col);
|
viewer_draw(col);
|
||||||
break;
|
break;
|
||||||
|
@ -677,10 +678,11 @@ static int viewer_recorder_on_button(int col)
|
||||||
init_need_scrollbar();
|
init_need_scrollbar();
|
||||||
viewer_draw(col);
|
viewer_draw(col);
|
||||||
|
|
||||||
rb->splash(HZ, 0, true, "%s %s (%s %s)",
|
rb->splash(HZ, true, "%s %s (%s %s)",
|
||||||
scrollbar_mode_str[SCROLLBAR_MODES],
|
scrollbar_mode_str[SCROLLBAR_MODES],
|
||||||
scrollbar_mode_str[scrollbar_mode[view_mode]],
|
scrollbar_mode_str[scrollbar_mode[view_mode]],
|
||||||
view_mode_str[view_mode], view_mode_str[VIEW_MODES]);
|
view_mode_str[view_mode],
|
||||||
|
view_mode_str[VIEW_MODES]);
|
||||||
}
|
}
|
||||||
viewer_draw(col);
|
viewer_draw(col);
|
||||||
break;
|
break;
|
||||||
|
@ -744,7 +746,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file)
|
||||||
|
|
||||||
ok = viewer_init(file);
|
ok = viewer_init(file);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
rb->splash(HZ, 0, false, "Error");
|
rb->splash(HZ, false, "Error");
|
||||||
viewer_exit();
|
viewer_exit();
|
||||||
return PLUGIN_OK;
|
return PLUGIN_OK;
|
||||||
}
|
}
|
||||||
|
@ -776,8 +778,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file)
|
||||||
#endif
|
#endif
|
||||||
viewer_draw(col);
|
viewer_draw(col);
|
||||||
|
|
||||||
rb->splash(HZ, 0, true, "%s %s",
|
rb->splash(HZ, true, "%s %s",
|
||||||
word_mode_str[word_mode], word_mode_str[WORD_MODES]);
|
word_mode_str[word_mode],
|
||||||
|
word_mode_str[WORD_MODES]);
|
||||||
|
|
||||||
viewer_draw(col);
|
viewer_draw(col);
|
||||||
break;
|
break;
|
||||||
|
@ -801,8 +804,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file)
|
||||||
#endif
|
#endif
|
||||||
viewer_draw(col);
|
viewer_draw(col);
|
||||||
|
|
||||||
rb->splash(HZ, 0, true, "%s %s",
|
rb->splash(HZ, true, "%s %s",
|
||||||
line_mode_str[line_mode], line_mode_str[LINE_MODES]);
|
line_mode_str[line_mode],
|
||||||
|
line_mode_str[LINE_MODES]);
|
||||||
|
|
||||||
viewer_draw(col);
|
viewer_draw(col);
|
||||||
break;
|
break;
|
||||||
|
@ -814,8 +818,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file)
|
||||||
#endif
|
#endif
|
||||||
/* View-width mode: NARROW or WIDE */
|
/* View-width mode: NARROW or WIDE */
|
||||||
if (line_mode == JOIN)
|
if (line_mode == JOIN)
|
||||||
rb->splash(HZ, 0, true, "(no %s %s)",
|
rb->splash(HZ, true, "(no %s %s)",
|
||||||
view_mode_str[WIDE], line_mode_str[JOIN]);
|
view_mode_str[WIDE],
|
||||||
|
line_mode_str[JOIN]);
|
||||||
else
|
else
|
||||||
if (++view_mode == VIEW_MODES)
|
if (++view_mode == VIEW_MODES)
|
||||||
view_mode = 0;
|
view_mode = 0;
|
||||||
|
@ -840,8 +845,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file)
|
||||||
#endif
|
#endif
|
||||||
viewer_draw(col);
|
viewer_draw(col);
|
||||||
|
|
||||||
rb->splash(HZ, 0, true, "%s %s",
|
rb->splash(HZ, true, "%s %s",
|
||||||
view_mode_str[view_mode], view_mode_str[VIEW_MODES]);
|
view_mode_str[view_mode],
|
||||||
|
view_mode_str[VIEW_MODES]);
|
||||||
|
|
||||||
viewer_draw(col);
|
viewer_draw(col);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -504,7 +504,7 @@ bool recording_screen(void)
|
||||||
if(mpeg_status() & MPEG_STATUS_ERROR)
|
if(mpeg_status() & MPEG_STATUS_ERROR)
|
||||||
{
|
{
|
||||||
status_set_playmode(STATUS_STOP);
|
status_set_playmode(STATUS_STOP);
|
||||||
splash(0, 0, true, str(LANG_DISK_FULL));
|
splash(0, true, str(LANG_DISK_FULL));
|
||||||
status_draw(true);
|
status_draw(true);
|
||||||
lcd_update();
|
lcd_update();
|
||||||
mpeg_error_clear();
|
mpeg_error_clear();
|
||||||
|
|
|
@ -673,8 +673,7 @@ bool f3_screen(void)
|
||||||
#define MAXLINES 2
|
#define MAXLINES 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void splash(int ticks, /* how long */
|
void splash(int ticks, /* how long the splash is displayed */
|
||||||
int keymask, /* what keymask aborts the waiting (if any) */
|
|
||||||
bool center, /* FALSE means left-justified, TRUE means
|
bool center, /* FALSE means left-justified, TRUE means
|
||||||
horizontal and vertical center */
|
horizontal and vertical center */
|
||||||
char *fmt, /* what to say *printf style */
|
char *fmt, /* what to say *printf style */
|
||||||
|
@ -813,24 +812,13 @@ void splash(int ticks, /* how long */
|
||||||
}
|
}
|
||||||
lcd_update();
|
lcd_update();
|
||||||
|
|
||||||
if(ticks) {
|
if(ticks)
|
||||||
if(keymask) {
|
/* unbreakable! */
|
||||||
int start = current_tick;
|
sleep(ticks);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void charging_splash(void)
|
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));
|
while (button_get(false));
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,6 @@ bool f3_screen(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void splash(int ticks, /* how long */
|
void splash(int ticks, /* how long */
|
||||||
int keymask,/* what keymask aborts the waiting (if any) */
|
|
||||||
bool center, /* FALSE means left-justified, TRUE means
|
bool center, /* FALSE means left-justified, TRUE means
|
||||||
horizontal and vertical center */
|
horizontal and vertical center */
|
||||||
char *fmt, /* what to say *printf style */
|
char *fmt, /* what to say *printf style */
|
||||||
|
|
|
@ -861,7 +861,7 @@ static bool dirbrowse(char *root, int *dirfilter)
|
||||||
|
|
||||||
if (*dirfilter > NUM_FILTER_MODES && numentries==0)
|
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() */
|
return false; /* No files found for rockbox_browser() */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1060,7 +1060,7 @@ static bool dirbrowse(char *root, int *dirfilter)
|
||||||
if(!lang_load(buf)) {
|
if(!lang_load(buf)) {
|
||||||
set_file(buf, global_settings.lang_file,
|
set_file(buf, global_settings.lang_file,
|
||||||
MAX_FILENAME);
|
MAX_FILENAME);
|
||||||
splash(HZ, 0, true, str(LANG_LANGUAGE_LOADED));
|
splash(HZ, true, str(LANG_LANGUAGE_LOADED));
|
||||||
restore = true;
|
restore = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -125,7 +125,7 @@ void display_keylock_text(bool locked)
|
||||||
else
|
else
|
||||||
s = str(LANG_KEYLOCK_OFF_RECORDER);
|
s = str(LANG_KEYLOCK_OFF_RECORDER);
|
||||||
#endif
|
#endif
|
||||||
splash(HZ, 0, true, s);
|
splash(HZ, true, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
void display_mute_text(bool muted)
|
void display_mute_text(bool muted)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue