mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Implement RTL as a viewport's bit-field
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22968 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
be25469b9b
commit
58221fc38d
3 changed files with 12 additions and 10 deletions
|
@ -27,15 +27,6 @@
|
|||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
#ifdef BOOTLOADER
|
||||
static int lang_is_rtl(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
#include "language.h"
|
||||
#endif
|
||||
|
||||
#ifndef LCDFN /* Not compiling for remote - define macros for main LCD. */
|
||||
#define LCDFN(fn) lcd_ ## fn
|
||||
#define FBFN(fn) fb_ ## fn
|
||||
|
@ -186,7 +177,7 @@ void LCDFN(puts_style_offset)(int x, int y, const unsigned char *str,
|
|||
chars_in_str = utf8length((char *)str);
|
||||
LCDFN(getstringsize)(str, &w, &h);
|
||||
xpos = x * w / chars_in_str;
|
||||
if (lang_is_rtl())
|
||||
if (current_vp->flags & VP_IS_RTL)
|
||||
xpos = current_vp->width - w - xpos;
|
||||
ypos = y * h;
|
||||
LCDFN(putsxyofs_style)(xpos, ypos, str, style, w, h, offset);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue