diff options
Diffstat (limited to 'apps/plugins/lua/rocklib_img.c')
-rw-r--r-- | apps/plugins/lua/rocklib_img.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/plugins/lua/rocklib_img.c b/apps/plugins/lua/rocklib_img.c index da3ef4b52c..887ef984d0 100644 --- a/apps/plugins/lua/rocklib_img.c +++ b/apps/plugins/lua/rocklib_img.c | |||
@@ -1242,6 +1242,7 @@ static int get_screen(lua_State *L, int narg) | |||
1242 | return screen; | 1242 | return screen; |
1243 | } | 1243 | } |
1244 | #else /* only SCREEN_MAIN exists */ | 1244 | #else /* only SCREEN_MAIN exists */ |
1245 | #define get_screen(a,b) (SCREEN_MAIN) | ||
1245 | #define RB_SCREEN_STRUCT(luastate, narg) \ | 1246 | #define RB_SCREEN_STRUCT(luastate, narg) \ |
1246 | rb->screens[SCREEN_MAIN] | 1247 | rb->screens[SCREEN_MAIN] |
1247 | #define RB_SCREENS(luastate, narg, func, ...) \ | 1248 | #define RB_SCREENS(luastate, narg, func, ...) \ |
@@ -1379,7 +1380,12 @@ RB_WRAP(font_getstringsize) | |||
1379 | 1380 | ||
1380 | RB_WRAP(lcd_framebuffer) | 1381 | RB_WRAP(lcd_framebuffer) |
1381 | { | 1382 | { |
1382 | rli_wrap(L, *rb->lcd_framebuffer, LCD_WIDTH, LCD_HEIGHT); | 1383 | int screen = get_screen(L, 1); |
1384 | static struct viewport vp; | ||
1385 | rb->viewport_set_fullscreen(&vp, screen); | ||
1386 | rli_wrap(L, vp.buffer->data, | ||
1387 | RB_SCREEN_STRUCT(L, 1)->lcdwidth, | ||
1388 | RB_SCREEN_STRUCT(L, 1)->lcdheight); | ||
1383 | return 1; | 1389 | return 1; |
1384 | } | 1390 | } |
1385 | 1391 | ||