summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/rocklib.c
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2020-10-02 14:30:41 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2020-10-03 22:09:52 +0000
commit80c3b84e08a1debc0e5af8567f9eeb0b1716303a (patch)
tree13763bcdf8c0a4e1bddab713a84145621ccc7213 /apps/plugins/lua/rocklib.c
parent1916aca7f3e76dd5440a9fa22ef4ea623bda8512 (diff)
downloadrockbox-80c3b84e08a1debc0e5af8567f9eeb0b1716303a.tar.gz
rockbox-80c3b84e08a1debc0e5af8567f9eeb0b1716303a.zip
lua Add scrollable stack traceback WIP
lua currently splashes a stack traceback on error for deep tracebacks and especially on devices with smaller screens this leaves out a lot of vital information in the past I have resorted to splitting the traceback string or even saving the return to a file This patch provides a scrollable buffer with rudimentary text reflow to allow you to read the whole traceback string Upon traceback if you press nothing the screen will display for 5 seconds If you press OK or CANCEL it will quit immediately PREV/NEXT scrolls the list on button press timeout is disabled lua now provides rb.splash_scroller(timeout, str) example script provided too Change-Id: Idbc8ce0c514196f0fae48c43aeaea8b60d6da1a5
Diffstat (limited to 'apps/plugins/lua/rocklib.c')
-rw-r--r--apps/plugins/lua/rocklib.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c
index 8eab08f987..5f0143efbb 100644
--- a/apps/plugins/lua/rocklib.c
+++ b/apps/plugins/lua/rocklib.c
@@ -287,6 +287,14 @@ RB_WRAP(do_menu)
287 return 1; 287 return 1;
288} 288}
289 289
290RB_WRAP(splash_scroller)
291{
292 int timeout = luaL_checkint(L, 1);
293 const char *str = luaL_checkstring(L, 2);
294 int action = splash_scroller(timeout, str); /*rockaux.c*/
295 lua_pushinteger(L, action);
296 return 1;
297}
290 298
291/* DEVICE AUDIO / PLAYLIST CONTROL */ 299/* DEVICE AUDIO / PLAYLIST CONTROL */
292 300
@@ -948,6 +956,7 @@ static const luaL_Reg rocklib[] =
948 RB_FUNC(kbd_input), 956 RB_FUNC(kbd_input),
949 RB_FUNC(gui_syncyesno_run), 957 RB_FUNC(gui_syncyesno_run),
950 RB_FUNC(do_menu), 958 RB_FUNC(do_menu),
959 RB_FUNC(splash_scroller),
951 960
952 /* DEVICE AUDIO / SOUND / PLAYLIST CONTROL */ 961 /* DEVICE AUDIO / SOUND / PLAYLIST CONTROL */
953 RB_FUNC(audio), 962 RB_FUNC(audio),