summaryrefslogtreecommitdiff
path: root/apps/plugins/helloworld.lua
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/helloworld.lua')
-rw-r--r--apps/plugins/helloworld.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/plugins/helloworld.lua b/apps/plugins/helloworld.lua
index 047e31a..c0e7554 100644
--- a/apps/plugins/helloworld.lua
+++ b/apps/plugins/helloworld.lua
@@ -35,7 +35,10 @@ function draw_image(img)
local func = rb.lcd_bitmap_transparent_part
if(func == nil) then
- func = rb.lcd_bitmap_part -- Fallback version for mono targets
+ func = rb.lcd_bitmap_part -- Fallback version for grayscale targets
+ if(func == nil) then
+ func = rb.lcd_mono_bitmap_part -- Fallback version for mono targets
+ end
end
func(img, 0, 0, img:width(), x, y, img:width(), img:height())
rb.lcd_update()
@@ -120,6 +123,9 @@ end
local backdrop = rb.read_bmp_file("/.rockbox/icons/tango_small_viewers.bmp") -- This image should always be present?
if(backdrop == nil) then
backdrop = rb.read_bmp_file("/.rockbox/icons/tango_small_viewers_mono.bmp") -- Try using the mono version
+ if(backdrop == nil) then
+ backdrop = rb.read_bmp_file("/.rockbox/icons/viewers.bmp") -- Try using the builtin version
+ end
end
-- Draws the image using our own draw_image() function; see up
draw_image(backdrop)