summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2018-11-24 16:40:23 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2018-11-24 16:40:23 -0500
commit9ed486bdc747b505a5b7b868c363dcff3e718a0d (patch)
tree8b848e1f914c97b96faec3fdba78fc69f51dbf9a
parente36edaee5568abce2cdfaba1f5c229a882cbd40f (diff)
downloadrockbox-9ed486bdc747b505a5b7b868c363dcff3e718a0d.tar.gz
rockbox-9ed486bdc747b505a5b7b868c363dcff3e718a0d.zip
lua add LCD_DEFAULT_FG, fix 2-bit screen fg/bg inversion
Change-Id: Ibe2bc6602ff27524a3b96d9523780acbfbf03c76
-rw-r--r--apps/plugins/lua/include_lua/draw.lua4
-rw-r--r--apps/plugins/lua/rocklib.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/apps/plugins/lua/include_lua/draw.lua b/apps/plugins/lua/include_lua/draw.lua
index 7bf71f0a6b..0ee3e93d75 100644
--- a/apps/plugins/lua/include_lua/draw.lua
+++ b/apps/plugins/lua/include_lua/draw.lua
@@ -350,8 +350,8 @@ local _draw = {} do
350 350
351 if rb.LCD_DEPTH == 2 then -- invert 2-bit screens 351 if rb.LCD_DEPTH == 2 then -- invert 2-bit screens
352 --vp.drawmode = bit.bxor(vp.drawmode, 4) 352 --vp.drawmode = bit.bxor(vp.drawmode, 4)
353 vp.fg_pattern = 3 - vp.fg_pattern 353 opts.fg_pattern = 3 - opts.fg_pattern
354 vp.bg_pattern = 3 - vp.bg_pattern 354 opts.bg_pattern = 3 - opts.bg_pattern
355 end 355 end
356 rb.set_viewport(opts) 356 rb.set_viewport(opts)
357 357
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c
index 5995fd89e9..a6a23f3381 100644
--- a/apps/plugins/lua/rocklib.c
+++ b/apps/plugins/lua/rocklib.c
@@ -649,6 +649,10 @@ LUALIB_API int luaopen_rock(lua_State *L)
649 RB_CONSTANT(LCD_HEIGHT), 649 RB_CONSTANT(LCD_HEIGHT),
650 RB_CONSTANT(LCD_WIDTH), 650 RB_CONSTANT(LCD_WIDTH),
651 RB_CONSTANT(SCREEN_MAIN), 651 RB_CONSTANT(SCREEN_MAIN),
652#if LCD_DEPTH > 1
653 RB_CONSTANT(LCD_DEFAULT_FG),
654 RB_CONSTANT(LCD_DEFAULT_BG),
655#endif
652#ifdef HAVE_REMOTE_LCD 656#ifdef HAVE_REMOTE_LCD
653 RB_CONSTANT(LCD_REMOTE_DEPTH), 657 RB_CONSTANT(LCD_REMOTE_DEPTH),
654 RB_CONSTANT(LCD_REMOTE_HEIGHT), 658 RB_CONSTANT(LCD_REMOTE_HEIGHT),