forked from len0rd/rockbox
Replaced the common for(i = 0; i < NB_SCREENS; i++) loop with a macro that just expands to i = 0; instead of the for() loop if NB_SCREENS == 1. Reduces binary size on platforms with only one screen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7805 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c83216ad89
commit
edf5a70e27
7 changed files with 36 additions and 30 deletions
|
|
@ -36,6 +36,12 @@ enum screen_type {
|
|||
#define NB_SCREENS 1
|
||||
#endif
|
||||
|
||||
#if NB_SCREENS == 1
|
||||
#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
|
||||
#define MAX_LINES_ON_SCREEN 2
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue