mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
lua add LCD_DEFAULT_FG, fix 2-bit screen fg/bg inversion
Change-Id: Ibe2bc6602ff27524a3b96d9523780acbfbf03c76
This commit is contained in:
parent
e36edaee55
commit
9ed486bdc7
2 changed files with 6 additions and 2 deletions
|
@ -350,8 +350,8 @@ local _draw = {} do
|
|||
|
||||
if rb.LCD_DEPTH == 2 then -- invert 2-bit screens
|
||||
--vp.drawmode = bit.bxor(vp.drawmode, 4)
|
||||
vp.fg_pattern = 3 - vp.fg_pattern
|
||||
vp.bg_pattern = 3 - vp.bg_pattern
|
||||
opts.fg_pattern = 3 - opts.fg_pattern
|
||||
opts.bg_pattern = 3 - opts.bg_pattern
|
||||
end
|
||||
rb.set_viewport(opts)
|
||||
|
||||
|
|
|
@ -649,6 +649,10 @@ LUALIB_API int luaopen_rock(lua_State *L)
|
|||
RB_CONSTANT(LCD_HEIGHT),
|
||||
RB_CONSTANT(LCD_WIDTH),
|
||||
RB_CONSTANT(SCREEN_MAIN),
|
||||
#if LCD_DEPTH > 1
|
||||
RB_CONSTANT(LCD_DEFAULT_FG),
|
||||
RB_CONSTANT(LCD_DEFAULT_BG),
|
||||
#endif
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
RB_CONSTANT(LCD_REMOTE_DEPTH),
|
||||
RB_CONSTANT(LCD_REMOTE_HEIGHT),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue