mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
FS#9051 - remove LCD margins... use viewports if you need them...
NOTE to WPS people.... %m has been removed, but (i think) because of the other %m tags it wont fail if you try loading a wps with %m|..|, it will just be ignored. Also note that if the statusbar is enabled the default viewport is 8 pixels shorter than when its not, i.e (0,0) is really (0,8) if the statusbar is shown... I dont think this will be a major issue because almost no WPS show the bar and use bitmaps... text only WPS shouldnt be affected. Please report problem screens in http://forums.rockbox.org/index.php?topic=17358.0 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17763 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c1b8df05e1
commit
bdbdb97f19
38 changed files with 145 additions and 418 deletions
|
@ -72,11 +72,8 @@ struct screen
|
|||
bool has_buttonbar;
|
||||
#endif
|
||||
void (*set_viewport)(struct viewport* vp);
|
||||
void (*setmargins)(int x, int y);
|
||||
int (*getwidth)(void);
|
||||
int (*getheight)(void);
|
||||
int (*getxmargin)(void);
|
||||
int (*getymargin)(void);
|
||||
int (*getstringsize)(const unsigned char *str, int *w, int *h);
|
||||
#if defined(HAVE_LCD_BITMAP) || defined(HAVE_REMOTE_LCD) /* always bitmap */
|
||||
void (*setfont)(int newfont);
|
||||
|
@ -155,32 +152,6 @@ struct screen
|
|||
void (*backlight_set_timeout)(int index);
|
||||
};
|
||||
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
/*
|
||||
* Sets if the given screen has a buttonbar or not
|
||||
* - screen : the screen structure
|
||||
* - has : a boolean telling wether the current screen will have a buttonbar or not
|
||||
*/
|
||||
#define screen_has_buttonbar(screen, has_btnb) \
|
||||
(screen)->has_buttonbar=has_btnb;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Sets the x margin in pixels for the given screen
|
||||
* - screen : the screen structure
|
||||
* - xmargin : the number of pixels to the left of the screen
|
||||
*/
|
||||
#define screen_set_xmargin(screen, xmargin) \
|
||||
(screen)->setmargins(xmargin, (screen)->getymargin());
|
||||
|
||||
/*
|
||||
* Sets the y margin in pixels for the given screen
|
||||
* - screen : the screen structure
|
||||
* - xmargin : the number of pixels to the top of the screen
|
||||
*/
|
||||
#define screen_set_ymargin(screen, ymargin) \
|
||||
(screen)->setmargins((screen)->getxmargin(), ymargin);
|
||||
|
||||
#if defined(HAVE_LCD_BITMAP) || defined(HAVE_REMOTE_LCD)
|
||||
/*
|
||||
* Clear only a given area of the screen
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue