diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c index 506fc6163d..1560f19d9e 100644 --- a/apps/plugins/lua/rocklib.c +++ b/apps/plugins/lua/rocklib.c @@ -226,7 +226,7 @@ static struct viewport* opt_viewport(lua_State *L, int narg, struct viewport* al #ifdef HAVE_LCD_COLOR check_tablevalue(L, "lss_pattern", tablepos, &vp->lss_pattern, true); check_tablevalue(L, "lse_pattern", tablepos, &vp->lse_pattern, true); - check_tablevalue(L, "lst_pattern", tablepos, &vp->lse_pattern, true); + check_tablevalue(L, "lst_pattern", tablepos, &vp->lst_pattern, true); #endif #endif @@ -243,7 +243,7 @@ RB_WRAP(set_viewport) RB_WRAP(clear_viewport) { - int screen = luaL_optint(L, 2, SCREEN_MAIN); + int screen = luaL_optint(L, 1, SCREEN_MAIN); rb->screens[screen]->clear_viewport(); return 0; } diff --git a/apps/plugins/test_viewports.lua b/apps/plugins/test_viewports.lua index 5af1ef4fb9..b9963ccf16 100644 --- a/apps/plugins/test_viewports.lua +++ b/apps/plugins/test_viewports.lua @@ -113,4 +113,4 @@ rb.lcd_update() rb.button_get(true) -rb.set_viewport() \ No newline at end of file +rb.set_viewport(nil)