mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Changed the FOR_NB_SCREENS macro to always be a for loop that declares its own loop variable. This removes the need to declare this variable in the outer scope.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f301ac05f9
commit
0942e2a0f7
59 changed files with 47 additions and 143 deletions
|
@ -57,7 +57,6 @@ bool alarm_screen(void)
|
||||||
struct tm *tm;
|
struct tm *tm;
|
||||||
int togo;
|
int togo;
|
||||||
int button;
|
int button;
|
||||||
int i;
|
|
||||||
bool update = true;
|
bool update = true;
|
||||||
bool hour_wrapped = false;
|
bool hour_wrapped = false;
|
||||||
struct viewport vp[NB_SCREENS];
|
struct viewport vp[NB_SCREENS];
|
||||||
|
|
|
@ -293,7 +293,7 @@ static void dbg_audio_task(void)
|
||||||
static bool dbg_buffering_thread(void)
|
static bool dbg_buffering_thread(void)
|
||||||
{
|
{
|
||||||
int button;
|
int button;
|
||||||
int line, i;
|
int line;
|
||||||
bool done = false;
|
bool done = false;
|
||||||
size_t bufused;
|
size_t bufused;
|
||||||
size_t bufsize = pcmbuf_get_bufsize();
|
size_t bufsize = pcmbuf_get_bufsize();
|
||||||
|
@ -2120,7 +2120,6 @@ static const struct the_menu_item menuitems[] = {
|
||||||
};
|
};
|
||||||
static int menu_action_callback(int btn, struct gui_synclist *lists)
|
static int menu_action_callback(int btn, struct gui_synclist *lists)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
if (btn == ACTION_STD_OK)
|
if (btn == ACTION_STD_OK)
|
||||||
{
|
{
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
|
|
10
apps/dsp.c
10
apps/dsp.c
|
@ -1618,8 +1618,7 @@ void dsp_set_compressor(void)
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
bool active = (threshold < 0);
|
bool active = (threshold < 0);
|
||||||
|
|
||||||
int i;
|
for (int i = 0; i < 5; i++)
|
||||||
for (i = 0; i < 5; i++)
|
|
||||||
{
|
{
|
||||||
if (curr_set[i] != new_set[i])
|
if (curr_set[i] != new_set[i])
|
||||||
{
|
{
|
||||||
|
@ -1657,7 +1656,6 @@ void dsp_set_compressor(void)
|
||||||
if (changed && active)
|
if (changed && active)
|
||||||
{
|
{
|
||||||
/* configure variables for compressor operation */
|
/* configure variables for compressor operation */
|
||||||
int i;
|
|
||||||
const int32_t db[] ={0x000000, /* positive db equivalents in S15.16 format */
|
const int32_t db[] ={0x000000, /* positive db equivalents in S15.16 format */
|
||||||
0x241FA4, 0x1E1A5E, 0x1A94C8, 0x181518, 0x1624EA, 0x148F82, 0x1338BD, 0x120FD2,
|
0x241FA4, 0x1E1A5E, 0x1A94C8, 0x181518, 0x1624EA, 0x148F82, 0x1338BD, 0x120FD2,
|
||||||
0x1109EB, 0x101FA4, 0x0F4BB6, 0x0E8A3C, 0x0DD840, 0x0D3377, 0x0C9A0E, 0x0C0A8C,
|
0x1109EB, 0x101FA4, 0x0F4BB6, 0x0E8A3C, 0x0DD840, 0x0D3377, 0x0C9A0E, 0x0C0A8C,
|
||||||
|
@ -1728,7 +1726,7 @@ void dsp_set_compressor(void)
|
||||||
comp_curve[0] = UNITY;
|
comp_curve[0] = UNITY;
|
||||||
/* comp_curve[1 to 63] are intermediate compression values corresponding
|
/* comp_curve[1 to 63] are intermediate compression values corresponding
|
||||||
to the 6 MSB of the input values of a non-clipped signal */
|
to the 6 MSB of the input values of a non-clipped signal */
|
||||||
for (i = 1; i < 64; i++)
|
for (int i = 1; i < 64; i++)
|
||||||
{
|
{
|
||||||
/* db constants are stored as positive numbers;
|
/* db constants are stored as positive numbers;
|
||||||
make them negative here */
|
make them negative here */
|
||||||
|
@ -1766,7 +1764,7 @@ void dsp_set_compressor(void)
|
||||||
db_curve[1].offset = 0;
|
db_curve[1].offset = 0;
|
||||||
db_curve[3].db = 0;
|
db_curve[3].db = 0;
|
||||||
|
|
||||||
for (i = 0; i <= 4; i++)
|
for (int i = 0; i <= 4; i++)
|
||||||
{
|
{
|
||||||
logf("Curve[%d]: db: % 6.2f\toffset: % 6.2f", i,
|
logf("Curve[%d]: db: % 6.2f\toffset: % 6.2f", i,
|
||||||
(float)db_curve[i].db / (1 << 16),
|
(float)db_curve[i].db / (1 << 16),
|
||||||
|
@ -1774,7 +1772,7 @@ void dsp_set_compressor(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
logf("\nGain factors:");
|
logf("\nGain factors:");
|
||||||
for (i = 1; i <= 65; i++)
|
for (int i = 1; i <= 65; i++)
|
||||||
{
|
{
|
||||||
debugf("%02d: %.6f ", i, (float)comp_curve[i] / UNITY);
|
debugf("%02d: %.6f ", i, (float)comp_curve[i] / UNITY);
|
||||||
if (i % 4 == 0) debugf("\n");
|
if (i % 4 == 0) debugf("\n");
|
||||||
|
|
|
@ -68,7 +68,6 @@ bool list_display_title(struct gui_synclist *list, enum screen_type screen);
|
||||||
|
|
||||||
void gui_synclist_scroll_stop(struct gui_synclist *lists)
|
void gui_synclist_scroll_stop(struct gui_synclist *lists)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
screens[i].scroll_stop(&list_text[i]);
|
screens[i].scroll_stop(&list_text[i]);
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
|
|
||||||
void gui_synclist_scroll_stop(struct gui_synclist *lists)
|
void gui_synclist_scroll_stop(struct gui_synclist *lists)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
(void)lists;
|
(void)lists;
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -420,7 +420,6 @@ bool set_color(struct screen *display, char *title,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
draw_screen(&screens[i], title, &rgb, slider);
|
draw_screen(&screens[i], title, &rgb, slider);
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ void list_init(void)
|
||||||
|
|
||||||
static void list_init_viewports(struct gui_synclist *list)
|
static void list_init_viewports(struct gui_synclist *list)
|
||||||
{
|
{
|
||||||
int i, parent_used;
|
int parent_used;
|
||||||
|
|
||||||
parent_used = (*list->parent != &parent[SCREEN_MAIN]);
|
parent_used = (*list->parent != &parent[SCREEN_MAIN]);
|
||||||
|
|
||||||
|
@ -156,7 +156,6 @@ void gui_synclist_init(struct gui_synclist * gui_list,
|
||||||
int selected_size, struct viewport list_parent[NB_SCREENS]
|
int selected_size, struct viewport list_parent[NB_SCREENS]
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
gui_list->callback_get_item_icon = NULL;
|
gui_list->callback_get_item_icon = NULL;
|
||||||
gui_list->callback_get_item_name = callback_get_item_name;
|
gui_list->callback_get_item_name = callback_get_item_name;
|
||||||
gui_list->callback_speak_item = NULL;
|
gui_list->callback_speak_item = NULL;
|
||||||
|
@ -237,7 +236,6 @@ int gui_list_get_item_offset(struct gui_synclist * gui_list,
|
||||||
*/
|
*/
|
||||||
void gui_synclist_draw(struct gui_synclist *gui_list)
|
void gui_synclist_draw(struct gui_synclist *gui_list)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
if (list_is_dirty(gui_list))
|
if (list_is_dirty(gui_list))
|
||||||
{
|
{
|
||||||
list_init_viewports(gui_list);
|
list_init_viewports(gui_list);
|
||||||
|
@ -345,7 +343,6 @@ void gui_synclist_speak_item(struct gui_synclist *lists)
|
||||||
*/
|
*/
|
||||||
void gui_synclist_select_item(struct gui_synclist * gui_list, int item_number)
|
void gui_synclist_select_item(struct gui_synclist * gui_list, int item_number)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
if (item_number >= gui_list->nb_items || item_number < 0)
|
if (item_number >= gui_list->nb_items || item_number < 0)
|
||||||
return;
|
return;
|
||||||
if (item_number != gui_list->selected_item)
|
if (item_number != gui_list->selected_item)
|
||||||
|
@ -380,13 +377,12 @@ static void gui_list_select_at_offset(struct gui_synclist * gui_list,
|
||||||
}
|
}
|
||||||
else if (gui_list->show_selection_marker == false)
|
else if (gui_list->show_selection_marker == false)
|
||||||
{
|
{
|
||||||
int i, nb_lines, screen_top;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
nb_lines = list_get_nb_lines(gui_list, i);
|
int nb_lines = list_get_nb_lines(gui_list, i);
|
||||||
if (offset > 0)
|
if (offset > 0)
|
||||||
{
|
{
|
||||||
screen_top = MAX(0, gui_list->nb_items - nb_lines);
|
int screen_top = MAX(0, gui_list->nb_items - nb_lines);
|
||||||
gui_list->start_item[i] = MIN(screen_top, gui_list->start_item[i] +
|
gui_list->start_item[i] = MIN(screen_top, gui_list->start_item[i] +
|
||||||
gui_list->selected_size);
|
gui_list->selected_size);
|
||||||
gui_list->selected_item = gui_list->start_item[i];
|
gui_list->selected_item = gui_list->start_item[i];
|
||||||
|
@ -452,7 +448,6 @@ void gui_synclist_set_title(struct gui_synclist * gui_list,
|
||||||
gui_list->title = title;
|
gui_list->title = title;
|
||||||
gui_list->title_icon = icon;
|
gui_list->title_icon = icon;
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
sb_set_title_text(title, icon, i);
|
sb_set_title_text(title, icon, i);
|
||||||
#endif
|
#endif
|
||||||
|
@ -461,9 +456,6 @@ void gui_synclist_set_title(struct gui_synclist * gui_list,
|
||||||
|
|
||||||
void gui_synclist_set_nb_items(struct gui_synclist * lists, int nb_items)
|
void gui_synclist_set_nb_items(struct gui_synclist * lists, int nb_items)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LCD_BITMAP
|
|
||||||
int i;
|
|
||||||
#endif
|
|
||||||
lists->nb_items = nb_items;
|
lists->nb_items = nb_items;
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
|
@ -531,7 +523,6 @@ void gui_synclist_limit_scroll(struct gui_synclist * lists, bool scroll)
|
||||||
*/
|
*/
|
||||||
static void gui_synclist_scroll_right(struct gui_synclist * lists)
|
static void gui_synclist_scroll_right(struct gui_synclist * lists)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
/* FIXME: This is a fake right boundry limiter. there should be some
|
/* FIXME: This is a fake right boundry limiter. there should be some
|
||||||
|
@ -549,7 +540,6 @@ static void gui_synclist_scroll_right(struct gui_synclist * lists)
|
||||||
*/
|
*/
|
||||||
static void gui_synclist_scroll_left(struct gui_synclist * lists)
|
static void gui_synclist_scroll_left(struct gui_synclist * lists)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
lists->offset_position[i] -= offset_step;
|
lists->offset_position[i] -= offset_step;
|
||||||
|
@ -817,7 +807,7 @@ static const char* simplelist_static_getname(int item,
|
||||||
bool simplelist_show_list(struct simplelist_info *info)
|
bool simplelist_show_list(struct simplelist_info *info)
|
||||||
{
|
{
|
||||||
struct gui_synclist lists;
|
struct gui_synclist lists;
|
||||||
int action, old_line_count = simplelist_line_count, i;
|
int action, old_line_count = simplelist_line_count;
|
||||||
list_get_name *getname;
|
list_get_name *getname;
|
||||||
int wrap = LIST_WRAP_UNLESS_HELD;
|
int wrap = LIST_WRAP_UNLESS_HELD;
|
||||||
if (info->get_name)
|
if (info->get_name)
|
||||||
|
|
|
@ -733,7 +733,7 @@ static int pitchscreen_do_touchscreen(struct viewport vps[])
|
||||||
|
|
||||||
int gui_syncpitchscreen_run(void)
|
int gui_syncpitchscreen_run(void)
|
||||||
{
|
{
|
||||||
int button, i;
|
int button;
|
||||||
int32_t pitch = sound_get_pitch();
|
int32_t pitch = sound_get_pitch();
|
||||||
int32_t semitone;
|
int32_t semitone;
|
||||||
|
|
||||||
|
|
|
@ -307,7 +307,7 @@ static int quickscreen_touchscreen_button(const struct viewport
|
||||||
|
|
||||||
static bool gui_syncquickscreen_run(struct gui_quickscreen * qs, int button_enter)
|
static bool gui_syncquickscreen_run(struct gui_quickscreen * qs, int button_enter)
|
||||||
{
|
{
|
||||||
int button, i, j;
|
int button;
|
||||||
struct viewport parent[NB_SCREENS];
|
struct viewport parent[NB_SCREENS];
|
||||||
struct viewport vps[NB_SCREENS][QUICKSCREEN_ITEM_COUNT];
|
struct viewport vps[NB_SCREENS][QUICKSCREEN_ITEM_COUNT];
|
||||||
struct viewport vp_icons[NB_SCREENS];
|
struct viewport vp_icons[NB_SCREENS];
|
||||||
|
@ -367,7 +367,7 @@ static bool gui_syncquickscreen_run(struct gui_quickscreen * qs, int button_ente
|
||||||
cond_talk_ids_fq(VOICE_OK);
|
cond_talk_ids_fq(VOICE_OK);
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{ /* stop scrolling before exiting */
|
{ /* stop scrolling before exiting */
|
||||||
for (j = 0; j < QUICKSCREEN_ITEM_COUNT; j++)
|
for (int j = 0; j < QUICKSCREEN_ITEM_COUNT; j++)
|
||||||
screens[i].scroll_stop(&vps[i][j]);
|
screens[i].scroll_stop(&vps[i][j]);
|
||||||
viewportmanager_theme_undo(i, true);
|
viewportmanager_theme_undo(i, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,10 +46,9 @@ static int current_lcd_backdrop[NB_SCREENS];
|
||||||
|
|
||||||
static int buflib_move_callback(int handle, void* current, void* new)
|
static int buflib_move_callback(int handle, void* current, void* new)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
if (handle == handle_being_loaded)
|
if (handle == handle_being_loaded)
|
||||||
return BUFLIB_CB_CANNOT_MOVE;
|
return BUFLIB_CB_CANNOT_MOVE;
|
||||||
for (i=0; i<NB_BDROPS; i++)
|
for (int i=0; i<NB_BDROPS; i++)
|
||||||
{
|
{
|
||||||
if (backdrops[i].buffer == current)
|
if (backdrops[i].buffer == current)
|
||||||
{
|
{
|
||||||
|
@ -65,9 +64,7 @@ static struct buflib_callbacks buflib_ops = {buflib_move_callback, NULL};
|
||||||
static bool first_go = true;
|
static bool first_go = true;
|
||||||
void skin_backdrop_init(void)
|
void skin_backdrop_init(void)
|
||||||
{
|
{
|
||||||
int i;
|
for (int i=0; i<NB_BDROPS; i++)
|
||||||
|
|
||||||
for (i=0; i<NB_BDROPS; i++)
|
|
||||||
{
|
{
|
||||||
if (first_go)
|
if (first_go)
|
||||||
backdrops[i].buflib_handle = -1;
|
backdrops[i].buflib_handle = -1;
|
||||||
|
|
|
@ -692,7 +692,6 @@ int skin_wait_for_action(enum skinnable_screens skin, int context, int timeout)
|
||||||
(void)skin; /* silence charcell warning */
|
(void)skin; /* silence charcell warning */
|
||||||
int button = ACTION_NONE;
|
int button = ACTION_NONE;
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
int i;
|
|
||||||
/* when the peak meter is enabled we want to have a
|
/* when the peak meter is enabled we want to have a
|
||||||
few extra updates to make it look smooth. On the
|
few extra updates to make it look smooth. On the
|
||||||
other hand we don't want to waste energy if it
|
other hand we don't want to waste energy if it
|
||||||
|
|
|
@ -84,7 +84,7 @@ static struct gui_skin {
|
||||||
|
|
||||||
void gui_sync_skin_init(void)
|
void gui_sync_skin_init(void)
|
||||||
{
|
{
|
||||||
int i, j;
|
int j;
|
||||||
for(j=0; j<SKINNABLE_SCREENS_COUNT; j++)
|
for(j=0; j<SKINNABLE_SCREENS_COUNT; j++)
|
||||||
{
|
{
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
|
@ -105,7 +105,7 @@ void gui_sync_skin_init(void)
|
||||||
|
|
||||||
void skin_unload_all(void)
|
void skin_unload_all(void)
|
||||||
{
|
{
|
||||||
int i, j;
|
int j;
|
||||||
|
|
||||||
for(j=0; j<SKINNABLE_SCREENS_COUNT; j++)
|
for(j=0; j<SKINNABLE_SCREENS_COUNT; j++)
|
||||||
{
|
{
|
||||||
|
@ -123,7 +123,7 @@ void skin_unload_all(void)
|
||||||
|
|
||||||
void settings_apply_skins(void)
|
void settings_apply_skins(void)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i;
|
||||||
|
|
||||||
skin_unload_all();
|
skin_unload_all();
|
||||||
/* Make sure each skin is loaded */
|
/* Make sure each skin is loaded */
|
||||||
|
@ -267,7 +267,6 @@ bool skin_do_full_update(enum skinnable_screens skin,
|
||||||
/* tell a skin to do a full update next time */
|
/* tell a skin to do a full update next time */
|
||||||
void skin_request_full_update(enum skinnable_screens skin)
|
void skin_request_full_update(enum skinnable_screens skin)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
skins[skin][i].needs_full_update = true;
|
skins[skin][i].needs_full_update = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,7 +200,6 @@ end:
|
||||||
void splashf(int ticks, const char *fmt, ...)
|
void splashf(int ticks, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
int i;
|
|
||||||
|
|
||||||
/* If fmt is a lang ID then get the corresponding string (which
|
/* If fmt is a lang ID then get the corresponding string (which
|
||||||
still might contain % place holders). */
|
still might contain % place holders). */
|
||||||
|
|
|
@ -268,7 +268,6 @@ char* sb_create_from_settings(enum screen_type screen)
|
||||||
|
|
||||||
void sb_skin_init(void)
|
void sb_skin_init(void)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
oldinfovp_label[i] = NULL;
|
oldinfovp_label[i] = NULL;
|
||||||
|
|
|
@ -805,7 +805,6 @@ static void gui_statusbar_icon_recording_info(struct screen * display)
|
||||||
|
|
||||||
void gui_syncstatusbar_init(struct gui_syncstatusbar * bars)
|
void gui_syncstatusbar_init(struct gui_syncstatusbar * bars)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i) {
|
FOR_NB_SCREENS(i) {
|
||||||
gui_statusbar_init( &(bars->statusbars[i]) );
|
gui_statusbar_init( &(bars->statusbars[i]) );
|
||||||
gui_statusbar_set_screen( &(bars->statusbars[i]), &(screens[i]) );
|
gui_statusbar_set_screen( &(bars->statusbars[i]), &(screens[i]) );
|
||||||
|
@ -818,7 +817,6 @@ void gui_syncstatusbar_draw(struct gui_syncstatusbar * bars,
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
if(!global_settings.statusbar)
|
if(!global_settings.statusbar)
|
||||||
return;
|
return;
|
||||||
int i;
|
|
||||||
struct viewport viewport;
|
struct viewport viewport;
|
||||||
FOR_NB_SCREENS(i) {
|
FOR_NB_SCREENS(i) {
|
||||||
GET_RECT(viewport,statusbar_position(i),&screens[i]);
|
GET_RECT(viewport,statusbar_position(i),&screens[i]);
|
||||||
|
|
|
@ -184,7 +184,6 @@ static void usb_screen_fix_viewports(struct screen *screen,
|
||||||
|
|
||||||
static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar)
|
static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
struct screen *screen = &screens[i];
|
struct screen *screen = &screens[i];
|
||||||
|
@ -242,7 +241,6 @@ static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar)
|
||||||
|
|
||||||
void gui_usb_screen_run(bool early_usb)
|
void gui_usb_screen_run(bool early_usb)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
struct usb_screen_vps_t usb_screen_vps_ar[NB_SCREENS];
|
struct usb_screen_vps_t usb_screen_vps_ar[NB_SCREENS];
|
||||||
#if defined HAVE_TOUCHSCREEN
|
#if defined HAVE_TOUCHSCREEN
|
||||||
enum touchscreen_mode old_mode = touchscreen_get_mode();
|
enum touchscreen_mode old_mode = touchscreen_get_mode();
|
||||||
|
|
|
@ -104,7 +104,6 @@ static void toggle_theme(enum screen_type screen, bool force)
|
||||||
bool enable_event = false;
|
bool enable_event = false;
|
||||||
static bool was_enabled[NB_SCREENS] = {false};
|
static bool was_enabled[NB_SCREENS] = {false};
|
||||||
static bool after_boot[NB_SCREENS] = {false};
|
static bool after_boot[NB_SCREENS] = {false};
|
||||||
int i;
|
|
||||||
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
|
@ -233,7 +232,6 @@ int viewport_get_nb_lines(const struct viewport *vp)
|
||||||
|
|
||||||
static void viewportmanager_redraw(void* data)
|
static void viewportmanager_redraw(void* data)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
@ -249,7 +247,6 @@ static void viewportmanager_redraw(void* data)
|
||||||
void viewportmanager_init()
|
void viewportmanager_init()
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
theme_stack_top[i] = -1; /* the next call fixes this to 0 */
|
theme_stack_top[i] = -1; /* the next call fixes this to 0 */
|
||||||
|
@ -264,7 +261,6 @@ void viewportmanager_init()
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
void viewportmanager_theme_changed(const int which)
|
void viewportmanager_theme_changed(const int which)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
#ifdef HAVE_BUTTONBAR
|
#ifdef HAVE_BUTTONBAR
|
||||||
if (which & THEME_BUTTONBAR)
|
if (which & THEME_BUTTONBAR)
|
||||||
{ /* don't handle further, the custom ui viewport ignores the buttonbar,
|
{ /* don't handle further, the custom ui viewport ignores the buttonbar,
|
||||||
|
|
|
@ -120,7 +120,6 @@ char* wps_default_skin(enum screen_type screen)
|
||||||
|
|
||||||
static void update_non_static(void)
|
static void update_non_static(void)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
skin_update(WPS, i, SKIN_REFRESH_NON_STATIC);
|
skin_update(WPS, i, SKIN_REFRESH_NON_STATIC);
|
||||||
}
|
}
|
||||||
|
@ -306,7 +305,6 @@ bool ffwd_rew(int button)
|
||||||
int direction = -1; /* forward=1 or backward=-1 */
|
int direction = -1; /* forward=1 or backward=-1 */
|
||||||
bool exit = false;
|
bool exit = false;
|
||||||
bool usb = false;
|
bool usb = false;
|
||||||
int i = 0;
|
|
||||||
const long ff_rw_accel = (global_settings.ff_rewind_accel + 3);
|
const long ff_rw_accel = (global_settings.ff_rewind_accel + 3);
|
||||||
|
|
||||||
if (button == ACTION_NONE)
|
if (button == ACTION_NONE)
|
||||||
|
@ -630,8 +628,6 @@ static void wps_lcd_activation_hook(void *param)
|
||||||
|
|
||||||
static void gwps_leave_wps(void)
|
static void gwps_leave_wps(void)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
skin_get_gwps(WPS, i)->display->stop_scroll();
|
skin_get_gwps(WPS, i)->display->stop_scroll();
|
||||||
|
@ -657,7 +653,6 @@ static void gwps_leave_wps(void)
|
||||||
* display the wps on entering or restoring */
|
* display the wps on entering or restoring */
|
||||||
static void gwps_enter_wps(void)
|
static void gwps_enter_wps(void)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
struct gui_wps *gwps;
|
struct gui_wps *gwps;
|
||||||
struct screen *display;
|
struct screen *display;
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
|
@ -738,7 +733,6 @@ long gui_wps_show(void)
|
||||||
bool bookmark = false;
|
bool bookmark = false;
|
||||||
bool update = false;
|
bool update = false;
|
||||||
bool vol_changed = false;
|
bool vol_changed = false;
|
||||||
int i;
|
|
||||||
long last_left = 0, last_right = 0;
|
long last_left = 0, last_right = 0;
|
||||||
struct wps_state *state = skin_get_global_state();
|
struct wps_state *state = skin_get_global_state();
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,6 @@ enum yesno_res gui_syncyesno_run(const struct text_message * main_message,
|
||||||
const struct text_message * yes_message,
|
const struct text_message * yes_message,
|
||||||
const struct text_message * no_message)
|
const struct text_message * no_message)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
int button;
|
int button;
|
||||||
int result=-1;
|
int result=-1;
|
||||||
bool result_displayed;
|
bool result_displayed;
|
||||||
|
@ -239,7 +238,6 @@ enum yesno_res gui_syncyesno_run(const struct text_message * main_message,
|
||||||
This function needs the output text as an argument. */
|
This function needs the output text as an argument. */
|
||||||
bool yesno_pop(const char* text)
|
bool yesno_pop(const char* text)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
const char *lines[]={text};
|
const char *lines[]={text};
|
||||||
const struct text_message message={lines, 1};
|
const struct text_message message={lines, 1};
|
||||||
bool ret = (gui_syncyesno_run(&message,NULL,NULL)== YESNO_YES);
|
bool ret = (gui_syncyesno_run(&message,NULL,NULL)== YESNO_YES);
|
||||||
|
|
|
@ -123,7 +123,6 @@ enum yesno_res gui_syncyesno_run(const struct text_message * main_message,
|
||||||
This function needs the output text as an argument. */
|
This function needs the output text as an argument. */
|
||||||
bool yesno_pop(const char* text)
|
bool yesno_pop(const char* text)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
const char *lines[]={text};
|
const char *lines[]={text};
|
||||||
const struct text_message message={lines, 1};
|
const struct text_message message={lines, 1};
|
||||||
bool ret = (gui_syncyesno_run(&message,NULL,NULL)== YESNO_YES);
|
bool ret = (gui_syncyesno_run(&message,NULL,NULL)== YESNO_YES);
|
||||||
|
|
|
@ -152,7 +152,6 @@ int main(void) INIT_ATTR MAIN_NORETURN_ATTR;
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
int i;
|
|
||||||
CHART(">init");
|
CHART(">init");
|
||||||
init();
|
init();
|
||||||
CHART("<init");
|
CHART("<init");
|
||||||
|
@ -336,9 +335,6 @@ static void init_tagcache(void)
|
||||||
|
|
||||||
static void init(void)
|
static void init(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LCD_BITMAP
|
|
||||||
int i;
|
|
||||||
#endif
|
|
||||||
system_init();
|
system_init();
|
||||||
core_allocator_init();
|
core_allocator_init();
|
||||||
kernel_init();
|
kernel_init();
|
||||||
|
@ -456,8 +452,8 @@ static void init(void)
|
||||||
lcd_remote_init();
|
lcd_remote_init();
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
FOR_NB_SCREENS(rc)
|
FOR_NB_SCREENS(i)
|
||||||
global_status.font_id[rc] = FONT_SYSFIXED;
|
global_status.font_id[i] = FONT_SYSFIXED;
|
||||||
font_init();
|
font_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -328,7 +328,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
|
||||||
int action;
|
int action;
|
||||||
struct gui_synclist lists;
|
struct gui_synclist lists;
|
||||||
const struct menu_item_ex *temp, *menu = start_menu;
|
const struct menu_item_ex *temp, *menu = start_menu;
|
||||||
int ret = 0, i;
|
int ret = 0;
|
||||||
bool redraw_lists;
|
bool redraw_lists;
|
||||||
int old_audio_status = audio_status();
|
int old_audio_status = audio_status();
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
|
|
|
@ -389,7 +389,7 @@ bool eq_menu_graphical(void)
|
||||||
int current_band, x, y, step, fast_step, min, max;
|
int current_band, x, y, step, fast_step, min, max;
|
||||||
enum eq_slider_mode mode;
|
enum eq_slider_mode mode;
|
||||||
char buf[24];
|
char buf[24];
|
||||||
int i, w, h, height, start_item, nb_eq_sliders[NB_SCREENS];
|
int w, h, height, start_item, nb_eq_sliders[NB_SCREENS];
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
viewportmanager_theme_enable(i, false, NULL);
|
viewportmanager_theme_enable(i, false, NULL);
|
||||||
|
|
||||||
|
|
|
@ -458,7 +458,7 @@ int rectrigger(void)
|
||||||
{
|
{
|
||||||
struct viewport vp[NB_SCREENS], triggervp[NB_SCREENS];
|
struct viewport vp[NB_SCREENS], triggervp[NB_SCREENS];
|
||||||
struct gui_synclist lists;
|
struct gui_synclist lists;
|
||||||
int i, action = ACTION_REDRAW;
|
int action = ACTION_REDRAW;
|
||||||
bool done = false, changed = true;
|
bool done = false, changed = true;
|
||||||
const struct settings_list *settings[TRIG_OPTION_COUNT];
|
const struct settings_list *settings[TRIG_OPTION_COUNT];
|
||||||
|
|
||||||
|
@ -550,7 +550,7 @@ int rectrigger(void)
|
||||||
pm_x, pm_y, pm_h, NB_SCREENS, triggervp);
|
pm_x, pm_y, pm_h, NB_SCREENS, triggervp);
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
screens[i].update();
|
screens[i].update();
|
||||||
i = gui_synclist_get_sel_pos(&lists);
|
int i = gui_synclist_get_sel_pos(&lists);
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case ACTION_STD_CANCEL:
|
case ACTION_STD_CANCEL:
|
||||||
|
|
|
@ -202,7 +202,6 @@ static int time_menu_callback(int action,
|
||||||
const struct menu_item_ex *this_item)
|
const struct menu_item_ex *this_item)
|
||||||
{
|
{
|
||||||
(void)this_item;
|
(void)this_item;
|
||||||
int i;
|
|
||||||
static int last_redraw = 0;
|
static int last_redraw = 0;
|
||||||
bool redraw = false;
|
bool redraw = false;
|
||||||
|
|
||||||
|
@ -247,7 +246,7 @@ MAKE_MENU(time_menu, ID2P(LANG_TIME_MENU), time_menu_callback, Icon_NOICON,
|
||||||
int time_screen(void* ignored)
|
int time_screen(void* ignored)
|
||||||
{
|
{
|
||||||
(void)ignored;
|
(void)ignored;
|
||||||
int i, nb_lines, font_h, ret;
|
int nb_lines, font_h, ret;
|
||||||
menu_was_pressed = false;
|
menu_was_pressed = false;
|
||||||
|
|
||||||
push_current_activity(ACTIVITY_TIMEDATESCREEN);
|
push_current_activity(ACTIVITY_TIMEDATESCREEN);
|
||||||
|
|
|
@ -253,7 +253,6 @@ static void system_restore(void)
|
||||||
static bool clean_shutdown(void (*callback)(void *), void *parameter)
|
static bool clean_shutdown(void (*callback)(void *), void *parameter)
|
||||||
{
|
{
|
||||||
long msg_id = -1;
|
long msg_id = -1;
|
||||||
int i;
|
|
||||||
|
|
||||||
scrobbler_poweroff();
|
scrobbler_poweroff();
|
||||||
|
|
||||||
|
@ -1079,9 +1078,6 @@ static enum current_activity
|
||||||
static int current_activity_top = 0;
|
static int current_activity_top = 0;
|
||||||
void push_current_activity(enum current_activity screen)
|
void push_current_activity(enum current_activity screen)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_LCD_BITMAP) && !defined(__PCTOOL__)
|
|
||||||
int i;
|
|
||||||
#endif
|
|
||||||
current_activity[current_activity_top++] = screen;
|
current_activity[current_activity_top++] = screen;
|
||||||
#if defined(HAVE_LCD_BITMAP) && !defined(__PCTOOL__)
|
#if defined(HAVE_LCD_BITMAP) && !defined(__PCTOOL__)
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
|
@ -1090,9 +1086,6 @@ void push_current_activity(enum current_activity screen)
|
||||||
}
|
}
|
||||||
void pop_current_activity(void)
|
void pop_current_activity(void)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_LCD_BITMAP) && !defined(__PCTOOL__)
|
|
||||||
int i;
|
|
||||||
#endif
|
|
||||||
current_activity_top--;
|
current_activity_top--;
|
||||||
#if defined(HAVE_LCD_BITMAP) && !defined(__PCTOOL__)
|
#if defined(HAVE_LCD_BITMAP) && !defined(__PCTOOL__)
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
|
|
|
@ -464,7 +464,6 @@ static int cat_playlist_callback(int action,
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
static void draw_slider(void)
|
static void draw_slider(void)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
struct viewport vp;
|
struct viewport vp;
|
||||||
|
|
|
@ -1452,7 +1452,6 @@ static int get_next_dir(char *dir, bool is_forward, bool recursion)
|
||||||
int result = -1;
|
int result = -1;
|
||||||
char *start_dir = NULL;
|
char *start_dir = NULL;
|
||||||
bool exit = false;
|
bool exit = false;
|
||||||
int i;
|
|
||||||
struct tree_context* tc = tree_get_context();
|
struct tree_context* tc = tree_get_context();
|
||||||
int saved_dirfilter = *(tc->dirfilter);
|
int saved_dirfilter = *(tc->dirfilter);
|
||||||
|
|
||||||
|
@ -1472,7 +1471,7 @@ static int get_next_dir(char *dir, bool is_forward, bool recursion)
|
||||||
exit = true;
|
exit = true;
|
||||||
while (!exit)
|
while (!exit)
|
||||||
{
|
{
|
||||||
i = rand()%folder_count;
|
int i = rand()%folder_count;
|
||||||
lseek(fd,sizeof(int) + (MAX_PATH*i),SEEK_SET);
|
lseek(fd,sizeof(int) + (MAX_PATH*i),SEEK_SET);
|
||||||
read(fd,buffer,MAX_PATH);
|
read(fd,buffer,MAX_PATH);
|
||||||
if (check_subdir_for_music(buffer, "", false) ==0)
|
if (check_subdir_for_music(buffer, "", false) ==0)
|
||||||
|
|
|
@ -809,7 +809,6 @@ static const struct plugin_api rockbox_api = {
|
||||||
|
|
||||||
int plugin_load(const char* plugin, const void* parameter)
|
int plugin_load(const char* plugin, const void* parameter)
|
||||||
{
|
{
|
||||||
int rc, i;
|
|
||||||
struct plugin_header *p_hdr;
|
struct plugin_header *p_hdr;
|
||||||
struct lc_header *hdr;
|
struct lc_header *hdr;
|
||||||
|
|
||||||
|
@ -889,7 +888,7 @@ int plugin_load(const char* plugin, const void* parameter)
|
||||||
open_files = 0;
|
open_files = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rc = p_hdr->entry_point(parameter);
|
int rc = p_hdr->entry_point(parameter);
|
||||||
|
|
||||||
tree_unlock_cache(tree_get_context());
|
tree_unlock_cache(tree_get_context());
|
||||||
pop_current_activity();
|
pop_current_activity();
|
||||||
|
|
|
@ -124,7 +124,6 @@ static void pause(void)
|
||||||
enum plugin_status plugin_start(const void* parameter)
|
enum plugin_status plugin_start(const void* parameter)
|
||||||
{
|
{
|
||||||
int button;
|
int button;
|
||||||
int i;
|
|
||||||
(void)parameter;
|
(void)parameter;
|
||||||
|
|
||||||
if (!can_play()) {
|
if (!can_play()) {
|
||||||
|
|
|
@ -110,7 +110,6 @@ enum plugin_status plugin_start(const void* parameter){
|
||||||
int button;
|
int button;
|
||||||
int last_second = -1;
|
int last_second = -1;
|
||||||
bool redraw=true;
|
bool redraw=true;
|
||||||
int i;
|
|
||||||
struct time time;
|
struct time time;
|
||||||
struct counter counter;
|
struct counter counter;
|
||||||
bool exit_clock = false;
|
bool exit_clock = false;
|
||||||
|
|
|
@ -70,7 +70,6 @@ void skin_restore_background(struct screen* display, int mode, int skin){
|
||||||
}
|
}
|
||||||
|
|
||||||
void clock_draw_set_colors(void){
|
void clock_draw_set_colors(void){
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
skin_set_background(rb->screens[i],
|
skin_set_background(rb->screens[i],
|
||||||
clock_settings.mode,
|
clock_settings.mode,
|
||||||
|
@ -78,7 +77,6 @@ void clock_draw_set_colors(void){
|
||||||
}
|
}
|
||||||
|
|
||||||
void clock_draw_restore_colors(void){
|
void clock_draw_restore_colors(void){
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i){
|
FOR_NB_SCREENS(i){
|
||||||
skin_restore_background(rb->screens[i],
|
skin_restore_background(rb->screens[i],
|
||||||
clock_settings.mode,
|
clock_settings.mode,
|
||||||
|
|
|
@ -153,7 +153,6 @@ void draw_message(struct screen* display, int msg, int y){
|
||||||
}
|
}
|
||||||
|
|
||||||
void load_settings(void){
|
void load_settings(void){
|
||||||
int i;
|
|
||||||
struct screen* display;
|
struct screen* display;
|
||||||
FOR_NB_SCREENS(i){
|
FOR_NB_SCREENS(i){
|
||||||
display=rb->screens[i];
|
display=rb->screens[i];
|
||||||
|
@ -179,7 +178,6 @@ void load_settings(void){
|
||||||
}
|
}
|
||||||
|
|
||||||
void save_settings(void){
|
void save_settings(void){
|
||||||
int i;
|
|
||||||
struct screen* display;
|
struct screen* display;
|
||||||
if(!settings_needs_saving(&clock_settings))
|
if(!settings_needs_saving(&clock_settings))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -326,7 +326,6 @@ int plugin_main(void)
|
||||||
int action;
|
int action;
|
||||||
int sleep_time=DEFAULT_WAIT_TIME;
|
int sleep_time=DEFAULT_WAIT_TIME;
|
||||||
int nb_wanted_polygons=DEFAULT_NB_POLYGONS;
|
int nb_wanted_polygons=DEFAULT_NB_POLYGONS;
|
||||||
int i;
|
|
||||||
struct polygon_fifo polygons[NB_SCREENS];
|
struct polygon_fifo polygons[NB_SCREENS];
|
||||||
struct polygon_move move[NB_SCREENS]; /* This describes the movement of the leading
|
struct polygon_move move[NB_SCREENS]; /* This describes the movement of the leading
|
||||||
polygon, the others just follow */
|
polygon, the others just follow */
|
||||||
|
|
|
@ -76,7 +76,7 @@ static bool dice_menu(struct dices* dice);
|
||||||
/* plugin entry point */
|
/* plugin entry point */
|
||||||
enum plugin_status plugin_start(const void* parameter) {
|
enum plugin_status plugin_start(const void* parameter) {
|
||||||
(void)parameter;
|
(void)parameter;
|
||||||
int i, action;
|
int action;
|
||||||
|
|
||||||
dice_init(&dice);
|
dice_init(&dice);
|
||||||
rb->srand(*rb->current_tick);
|
rb->srand(*rb->current_tick);
|
||||||
|
|
|
@ -38,7 +38,6 @@ static void atexit_cleanup(void);
|
||||||
|
|
||||||
enum plugin_status plugin_start(const void* parameter)
|
enum plugin_status plugin_start(const void* parameter)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
char* ext;
|
char* ext;
|
||||||
|
|
||||||
atexit(atexit_cleanup);
|
atexit(atexit_cleanup);
|
||||||
|
|
|
@ -134,7 +134,6 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
{
|
{
|
||||||
char *buf;
|
char *buf;
|
||||||
int rc;
|
int rc;
|
||||||
int i;
|
|
||||||
if(!parameter) return PLUGIN_ERROR;
|
if(!parameter) return PLUGIN_ERROR;
|
||||||
filename = (char *)parameter;
|
filename = (char *)parameter;
|
||||||
|
|
||||||
|
|
|
@ -119,9 +119,8 @@ static void jackpot_exit(void)
|
||||||
|
|
||||||
static void jackpot_init(struct jackpot* game)
|
static void jackpot_init(struct jackpot* game)
|
||||||
{
|
{
|
||||||
int i,j;
|
|
||||||
game->money=20;
|
game->money=20;
|
||||||
for(i=0;i<NB_SLOTS;i++){
|
for(int i=0;i<NB_SLOTS;i++){
|
||||||
game->slot_state[i]=(rb->rand()%NB_PICTURES)*PICTURE_ROTATION_STEPS;
|
game->slot_state[i]=(rb->rand()%NB_PICTURES)*PICTURE_ROTATION_STEPS;
|
||||||
FOR_NB_SCREENS(j)
|
FOR_NB_SCREENS(j)
|
||||||
game->state_y[j][i]=-1;
|
game->state_y[j][i]=-1;
|
||||||
|
@ -254,11 +253,11 @@ static void jackpot_play_turn(struct jackpot* game)
|
||||||
{
|
{
|
||||||
/* How many pattern? */
|
/* How many pattern? */
|
||||||
int nb_turns[NB_SLOTS];
|
int nb_turns[NB_SLOTS];
|
||||||
int i,d,gain,turns_remaining=0;
|
int gain,turns_remaining=0;
|
||||||
if(game->money<=0)
|
if(game->money<=0)
|
||||||
return;
|
return;
|
||||||
game->money--;
|
game->money--;
|
||||||
for(i=0;i<NB_SLOTS;i++)
|
for(int i=0;i<NB_SLOTS;i++)
|
||||||
{
|
{
|
||||||
nb_turns[i]=(rb->rand()%15+5)*PICTURE_ROTATION_STEPS;
|
nb_turns[i]=(rb->rand()%15+5)*PICTURE_ROTATION_STEPS;
|
||||||
turns_remaining+=nb_turns[i];
|
turns_remaining+=nb_turns[i];
|
||||||
|
@ -271,7 +270,7 @@ static void jackpot_play_turn(struct jackpot* game)
|
||||||
/* Jackpot Animation */
|
/* Jackpot Animation */
|
||||||
while(turns_remaining>0)
|
while(turns_remaining>0)
|
||||||
{
|
{
|
||||||
for(i=0;i<NB_SLOTS;i++)
|
for(int i=0;i<NB_SLOTS;i++)
|
||||||
{
|
{
|
||||||
if(nb_turns[i]>0)
|
if(nb_turns[i]>0)
|
||||||
{
|
{
|
||||||
|
@ -295,7 +294,7 @@ static void jackpot_play_turn(struct jackpot* game)
|
||||||
|
|
||||||
enum plugin_status plugin_start(const void* parameter)
|
enum plugin_status plugin_start(const void* parameter)
|
||||||
{
|
{
|
||||||
int action, i;
|
int action;
|
||||||
struct jackpot game;
|
struct jackpot game;
|
||||||
(void)parameter;
|
(void)parameter;
|
||||||
atexit(jackpot_exit);
|
atexit(jackpot_exit);
|
||||||
|
|
|
@ -1600,7 +1600,7 @@ static void display_state(void)
|
||||||
info = "(no info)";
|
info = "(no info)";
|
||||||
}
|
}
|
||||||
|
|
||||||
int i, w, h;
|
int w, h;
|
||||||
struct screen* display;
|
struct screen* display;
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
|
@ -1640,7 +1640,7 @@ static void display_time(void)
|
||||||
current.elapsed/60000, (current.elapsed/1000)%60,
|
current.elapsed/60000, (current.elapsed/1000)%60,
|
||||||
current.length/60000, (current.length)/1000%60);
|
current.length/60000, (current.length)/1000%60);
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
int y = (prefs.display_title? font_ui_height:0), i;
|
int y = (prefs.display_title? font_ui_height:0);
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
struct screen* display = rb->screens[i];
|
struct screen* display = rb->screens[i];
|
||||||
|
@ -1842,7 +1842,7 @@ static int display_lrc_line(struct lrc_line *lrc_line, int ypos, int i)
|
||||||
static void display_lrcs(void)
|
static void display_lrcs(void)
|
||||||
{
|
{
|
||||||
long time_start, time_end, rin, len;
|
long time_start, time_end, rin, len;
|
||||||
int i, nline[NB_SCREENS] = {0};
|
int nline[NB_SCREENS] = {0};
|
||||||
struct lrc_line *lrc_center = current.ll_head;
|
struct lrc_line *lrc_center = current.ll_head;
|
||||||
|
|
||||||
if (!lrc_center) return;
|
if (!lrc_center) return;
|
||||||
|
@ -2773,7 +2773,6 @@ static int handle_button(void)
|
||||||
static int lrc_main(void)
|
static int lrc_main(void)
|
||||||
{
|
{
|
||||||
int ret = LRC_GOTO_MAIN;
|
int ret = LRC_GOTO_MAIN;
|
||||||
int i;
|
|
||||||
long id3_timeout = 0;
|
long id3_timeout = 0;
|
||||||
bool update_display_state = true;
|
bool update_display_state = true;
|
||||||
|
|
||||||
|
|
|
@ -495,7 +495,6 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
int lastbutton = BUTTON_NONE;
|
int lastbutton = BUTTON_NONE;
|
||||||
#endif
|
#endif
|
||||||
int quit = 0;
|
int quit = 0;
|
||||||
int i;
|
|
||||||
struct maze maze;
|
struct maze maze;
|
||||||
(void)parameter;
|
(void)parameter;
|
||||||
|
|
||||||
|
|
|
@ -781,7 +781,6 @@ static void metronome_draw(struct screen* display)
|
||||||
|
|
||||||
static void draw_display(void)
|
static void draw_display(void)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
metronome_draw(rb->screens[i]);
|
metronome_draw(rb->screens[i]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -281,9 +281,6 @@ static const char * get_props(int selected_item, void* data,
|
||||||
enum plugin_status plugin_start(const void* parameter)
|
enum plugin_status plugin_start(const void* parameter)
|
||||||
{
|
{
|
||||||
struct gui_synclist properties_lists;
|
struct gui_synclist properties_lists;
|
||||||
#ifdef HAVE_LCD_BITMAP
|
|
||||||
int i;
|
|
||||||
#endif
|
|
||||||
int button;
|
int button;
|
||||||
bool quit = false, usb = false;
|
bool quit = false, usb = false;
|
||||||
char file[MAX_PATH];
|
char file[MAX_PATH];
|
||||||
|
|
|
@ -46,7 +46,6 @@ struct file_format *list = NULL;
|
||||||
static void update_screen(bool clear)
|
static void update_screen(bool clear)
|
||||||
{
|
{
|
||||||
char buf[15];
|
char buf[15];
|
||||||
int i;
|
|
||||||
|
|
||||||
rb->snprintf(buf,sizeof(buf),"Folders: %d",dirs_count);
|
rb->snprintf(buf,sizeof(buf),"Folders: %d",dirs_count);
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
|
|
|
@ -103,7 +103,6 @@ static void search_buffer(void){
|
||||||
}
|
}
|
||||||
|
|
||||||
static void clear_display(void){
|
static void clear_display(void){
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i){
|
FOR_NB_SCREENS(i){
|
||||||
rb->screens[i]->clear_display();
|
rb->screens[i]->clear_display();
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,9 +195,6 @@ bool ends_with(char *string, char *suffix)
|
||||||
|
|
||||||
enum plugin_status plugin_start(const void* void_parameter)
|
enum plugin_status plugin_start(const void* void_parameter)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LCD_BITMAP
|
|
||||||
int i;
|
|
||||||
#endif
|
|
||||||
bool leave_loop;
|
bool leave_loop;
|
||||||
|
|
||||||
/* This is a viewer, so a parameter must have been specified */
|
/* This is a viewer, so a parameter must have been specified */
|
||||||
|
|
|
@ -1383,7 +1383,6 @@ static int sokoban_menu(void)
|
||||||
{
|
{
|
||||||
int button;
|
int button;
|
||||||
int selection = 0;
|
int selection = 0;
|
||||||
int i;
|
|
||||||
bool menu_quit;
|
bool menu_quit;
|
||||||
int start_selected = 0;
|
int start_selected = 0;
|
||||||
int prev_level = current_info.level.index;
|
int prev_level = current_info.level.index;
|
||||||
|
|
|
@ -283,7 +283,7 @@ struct keyboard_parameters param[NB_SCREENS];
|
||||||
int zx_kbd_input(char* text/*, int buflen*/)
|
int zx_kbd_input(char* text/*, int buflen*/)
|
||||||
{
|
{
|
||||||
bool done = false;
|
bool done = false;
|
||||||
int i, j, k, w, l;
|
int i, j, k, w;
|
||||||
int text_w = 0;
|
int text_w = 0;
|
||||||
#ifdef ZX_WRITE_OUT_TEXT
|
#ifdef ZX_WRITE_OUT_TEXT
|
||||||
int editpos, len_utf8;
|
int editpos, len_utf8;
|
||||||
|
|
|
@ -539,7 +539,6 @@ int handle_radio_presets(void)
|
||||||
int presets_scan(void *viewports)
|
int presets_scan(void *viewports)
|
||||||
{
|
{
|
||||||
bool do_scan = true;
|
bool do_scan = true;
|
||||||
int i;
|
|
||||||
struct viewport *vp = (struct viewport *)viewports;
|
struct viewport *vp = (struct viewport *)viewports;
|
||||||
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
|
|
|
@ -355,7 +355,6 @@ void radio_screen(void)
|
||||||
{
|
{
|
||||||
bool done = false;
|
bool done = false;
|
||||||
int button;
|
int button;
|
||||||
int i;
|
|
||||||
bool stereo = false, last_stereo = false;
|
bool stereo = false, last_stereo = false;
|
||||||
int update_type = 0;
|
int update_type = 0;
|
||||||
bool screen_freeze = false;
|
bool screen_freeze = false;
|
||||||
|
|
|
@ -63,7 +63,6 @@ char* default_radio_skin(enum screen_type screen)
|
||||||
|
|
||||||
void fms_fix_displays(enum fms_exiting toggle_state)
|
void fms_fix_displays(enum fms_exiting toggle_state)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
struct wps_data *data = skin_get_gwps(FM_SCREEN, i)->data;
|
struct wps_data *data = skin_get_gwps(FM_SCREEN, i)->data;
|
||||||
|
|
|
@ -99,7 +99,7 @@ static int load_radioart_image(struct radioart *ra, const char* preset_name,
|
||||||
int radio_get_art_hid(struct dim *requested_dim)
|
int radio_get_art_hid(struct dim *requested_dim)
|
||||||
{
|
{
|
||||||
int preset = radio_current_preset();
|
int preset = radio_current_preset();
|
||||||
int i, free_idx = -1;
|
int free_idx = -1;
|
||||||
const char* preset_name;
|
const char* preset_name;
|
||||||
if (radio_scan_mode() || preset < 0)
|
if (radio_scan_mode() || preset < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -108,7 +108,7 @@ int radio_get_art_hid(struct dim *requested_dim)
|
||||||
return -1;
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
preset_name = radio_get_preset_name(preset);
|
preset_name = radio_get_preset_name(preset);
|
||||||
for(i=0;i<MAX_RADIOART_IMAGES;i++)
|
for (int i=0; i<MAX_RADIOART_IMAGES; i++)
|
||||||
{
|
{
|
||||||
if (radioart[i].handle < 0)
|
if (radioart[i].handle < 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -142,7 +142,7 @@ static const unsigned char morse_codes[] = {
|
||||||
call with NULL to reset keyboard */
|
call with NULL to reset keyboard */
|
||||||
int load_kbd(unsigned char* filename)
|
int load_kbd(unsigned char* filename)
|
||||||
{
|
{
|
||||||
int fd, l;
|
int fd;
|
||||||
int i, line_len, max_line_len;
|
int i, line_len, max_line_len;
|
||||||
unsigned char buf[4];
|
unsigned char buf[4];
|
||||||
unsigned short *pbuf;
|
unsigned short *pbuf;
|
||||||
|
@ -331,7 +331,6 @@ int kbd_input(char* text, int buflen)
|
||||||
bool done = false;
|
bool done = false;
|
||||||
struct keyboard_parameters * const param = kbd_param;
|
struct keyboard_parameters * const param = kbd_param;
|
||||||
struct edit_state state;
|
struct edit_state state;
|
||||||
int l; /* screen loop variable */
|
|
||||||
unsigned short ch;
|
unsigned short ch;
|
||||||
int ret = 0; /* assume success */
|
int ret = 0; /* assume success */
|
||||||
FOR_NB_SCREENS(l)
|
FOR_NB_SCREENS(l)
|
||||||
|
|
|
@ -403,7 +403,7 @@ static void peak_meter_set_min(int newmin)
|
||||||
|
|
||||||
pm_db_min = calc_db(peak_meter_range_min);
|
pm_db_min = calc_db(peak_meter_range_min);
|
||||||
pm_db_range = pm_db_max - pm_db_min;
|
pm_db_range = pm_db_max - pm_db_min;
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
scales[i].db_scale_valid = false;
|
scales[i].db_scale_valid = false;
|
||||||
}
|
}
|
||||||
|
@ -452,7 +452,7 @@ static void peak_meter_set_max(int newmax)
|
||||||
|
|
||||||
pm_db_max = calc_db(peak_meter_range_max);
|
pm_db_max = calc_db(peak_meter_range_max);
|
||||||
pm_db_range = pm_db_max - pm_db_min;
|
pm_db_range = pm_db_max - pm_db_min;
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
scales[i].db_scale_valid = false;
|
scales[i].db_scale_valid = false;
|
||||||
}
|
}
|
||||||
|
@ -493,7 +493,6 @@ bool peak_meter_get_use_dbfs(void)
|
||||||
*/
|
*/
|
||||||
void peak_meter_set_use_dbfs(bool use)
|
void peak_meter_set_use_dbfs(bool use)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
pm_use_dbfs = use;
|
pm_use_dbfs = use;
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
scales[i].db_scale_valid = false;
|
scales[i].db_scale_valid = false;
|
||||||
|
@ -571,7 +570,6 @@ void pm_reset_clipcount(void)
|
||||||
*/
|
*/
|
||||||
void peak_meter_playback(bool playback)
|
void peak_meter_playback(bool playback)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
#if (CONFIG_PLATFORM & PLATFORM_HOSTED)
|
#if (CONFIG_PLATFORM & PLATFORM_HOSTED)
|
||||||
(void)playback;
|
(void)playback;
|
||||||
#elif CONFIG_CODEC == SWCODEC
|
#elif CONFIG_CODEC == SWCODEC
|
||||||
|
@ -1313,7 +1311,6 @@ void peak_meter_draw_trig(int xpos[], int ypos[],
|
||||||
int barend[NB_SCREENS];
|
int barend[NB_SCREENS];
|
||||||
int icon;
|
int icon;
|
||||||
int ixpos[NB_SCREENS];
|
int ixpos[NB_SCREENS];
|
||||||
int i;
|
|
||||||
int trigbar_width[NB_SCREENS];
|
int trigbar_width[NB_SCREENS];
|
||||||
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
|
@ -1374,7 +1371,7 @@ void peak_meter_draw_trig(int xpos[], int ypos[],
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i = 0; i < nb_screens; i++)
|
for(int i = 0; i < nb_screens; i++)
|
||||||
{
|
{
|
||||||
gui_scrollbar_draw(&screens[i], xpos[i] + ICON_PLAY_STATE_WIDTH + 1,
|
gui_scrollbar_draw(&screens[i], xpos[i] + ICON_PLAY_STATE_WIDTH + 1,
|
||||||
ypos[i] + 1, trigbar_width[i], TRIG_HEIGHT - 2,
|
ypos[i] + 1, trigbar_width[i], TRIG_HEIGHT - 2,
|
||||||
|
|
|
@ -184,7 +184,7 @@ static bool remote_display_on = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* as we have the ability to disable the remote, we need an alternative loop */
|
/* as we have the ability to disable the remote, we need an alternative loop */
|
||||||
#define FOR_NB_ACTIVE_SCREENS(i) for(i = 0; i < screen_update; i++)
|
#define FOR_NB_ACTIVE_SCREENS(i) for(int i = 0; i < screen_update; i++)
|
||||||
|
|
||||||
static bool update_list = false; /* (GIU) list needs updating */
|
static bool update_list = false; /* (GIU) list needs updating */
|
||||||
|
|
||||||
|
@ -1042,7 +1042,6 @@ bool recording_screen(bool no_source)
|
||||||
int peak_l, peak_r;
|
int peak_l, peak_r;
|
||||||
int balance = 0;
|
int balance = 0;
|
||||||
#endif
|
#endif
|
||||||
int i;
|
|
||||||
int pm_x[NB_SCREENS]; /* peakmeter (and trigger bar) x pos */
|
int pm_x[NB_SCREENS]; /* peakmeter (and trigger bar) x pos */
|
||||||
int pm_y[NB_SCREENS]; /* peakmeter y pos */
|
int pm_y[NB_SCREENS]; /* peakmeter y pos */
|
||||||
int pm_h[NB_SCREENS]; /* peakmeter height */
|
int pm_h[NB_SCREENS]; /* peakmeter height */
|
||||||
|
@ -2009,7 +2008,7 @@ static bool f2_rec_screen(void)
|
||||||
|
|
||||||
bool exit = false;
|
bool exit = false;
|
||||||
bool used = false;
|
bool used = false;
|
||||||
int w, h, i;
|
int w, h;
|
||||||
char buf[32];
|
char buf[32];
|
||||||
int button;
|
int button;
|
||||||
struct audio_recording_options rec_options;
|
struct audio_recording_options rec_options;
|
||||||
|
@ -2140,7 +2139,7 @@ static bool f3_rec_screen(void)
|
||||||
{
|
{
|
||||||
bool exit = false;
|
bool exit = false;
|
||||||
bool used = false;
|
bool used = false;
|
||||||
int w, h, i;
|
int w, h;
|
||||||
int button;
|
int button;
|
||||||
const char *src_str[] =
|
const char *src_str[] =
|
||||||
{
|
{
|
||||||
|
|
|
@ -194,7 +194,6 @@ static int browser(void* param)
|
||||||
static const struct text_message message={lines, 2};
|
static const struct text_message message={lines, 2};
|
||||||
if(gui_syncyesno_run(&message, NULL, NULL) == YESNO_NO)
|
if(gui_syncyesno_run(&message, NULL, NULL) == YESNO_NO)
|
||||||
break;
|
break;
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
screens[i].clear_display();
|
screens[i].clear_display();
|
||||||
|
|
||||||
|
|
|
@ -34,11 +34,7 @@ void screen_helper_remote_setfont(int font);
|
||||||
#endif
|
#endif
|
||||||
void screen_helper_setfont(int font);
|
void screen_helper_setfont(int font);
|
||||||
|
|
||||||
#if NB_SCREENS == 1
|
#define FOR_NB_SCREENS(i) for(int i = 0; i < NB_SCREENS; i++)
|
||||||
#define FOR_NB_SCREENS(i) i = 0;
|
|
||||||
#else
|
|
||||||
#define FOR_NB_SCREENS(i) for(i = 0; i < NB_SCREENS; i++)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
#define MAX_LINES_ON_SCREEN 2
|
#define MAX_LINES_ON_SCREEN 2
|
||||||
|
|
|
@ -347,7 +347,6 @@ bool set_time_screen(const char* title, struct tm *tm)
|
||||||
struct viewport viewports[NB_SCREENS];
|
struct viewport viewports[NB_SCREENS];
|
||||||
bool done = false, usb = false;
|
bool done = false, usb = false;
|
||||||
int cursorpos = 0;
|
int cursorpos = 0;
|
||||||
unsigned int s;
|
|
||||||
unsigned char offsets_ptr[] =
|
unsigned char offsets_ptr[] =
|
||||||
{ OFF_HOURS, OFF_MINUTES, OFF_SECONDS, OFF_YEAR, 0, OFF_DAY };
|
{ OFF_HOURS, OFF_MINUTES, OFF_SECONDS, OFF_YEAR, 0, OFF_DAY };
|
||||||
|
|
||||||
|
|
|
@ -1067,9 +1067,7 @@ void reset_setting(const struct settings_list *setting, void *var)
|
||||||
|
|
||||||
void settings_reset(void)
|
void settings_reset(void)
|
||||||
{
|
{
|
||||||
int i;
|
for(int i=0; i<nb_settings; i++)
|
||||||
|
|
||||||
for(i=0; i<nb_settings; i++)
|
|
||||||
reset_setting(&settings[i], settings[i].setting);
|
reset_setting(&settings[i], settings[i].setting);
|
||||||
#if defined (HAVE_RECORDING) && CONFIG_CODEC == SWCODEC
|
#if defined (HAVE_RECORDING) && CONFIG_CODEC == SWCODEC
|
||||||
enc_global_settings_reset();
|
enc_global_settings_reset();
|
||||||
|
|
|
@ -270,7 +270,6 @@ bool check_rockboxdir(void)
|
||||||
if(!dir_exists(ROCKBOX_DIR))
|
if(!dir_exists(ROCKBOX_DIR))
|
||||||
{ /* No need to localise this message.
|
{ /* No need to localise this message.
|
||||||
If .rockbox is missing, it wouldn't work anyway */
|
If .rockbox is missing, it wouldn't work anyway */
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
screens[i].clear_display();
|
screens[i].clear_display();
|
||||||
splash(HZ*2, "No .rockbox directory");
|
splash(HZ*2, "No .rockbox directory");
|
||||||
|
@ -290,7 +289,6 @@ void tree_gui_init(void)
|
||||||
strcpy(tc.currdir, "/");
|
strcpy(tc.currdir, "/");
|
||||||
|
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
screens[i].double_height(false);
|
screens[i].double_height(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue