forked from len0rd/rockbox
Add touchscreen_get_mode() to plugin and lua.
Change-Id: I44b8693c689da00f57c14622f4ba3dc554dbbfc9
This commit is contained in:
parent
f4954c4a9b
commit
b8439f2aea
3 changed files with 8 additions and 0 deletions
|
@ -326,6 +326,7 @@ static const struct plugin_api rockbox_api = {
|
|||
#endif
|
||||
#ifdef HAVE_TOUCHSCREEN
|
||||
touchscreen_set_mode,
|
||||
touchscreen_get_mode,
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BUTTON_LIGHT
|
||||
|
|
|
@ -413,6 +413,7 @@ struct plugin_api {
|
|||
#endif
|
||||
#ifdef HAVE_TOUCHSCREEN
|
||||
void (*touchscreen_set_mode)(enum touchscreen_mode);
|
||||
enum touchscreen_mode (*touchscreen_get_mode)(void);
|
||||
#endif
|
||||
#ifdef HAVE_BUTTON_LIGHT
|
||||
void (*buttonlight_set_timeout)(int value);
|
||||
|
|
|
@ -425,6 +425,11 @@ RB_WRAP(touchscreen_set_mode)
|
|||
rb->touchscreen_set_mode(mode);
|
||||
return 0;
|
||||
}
|
||||
RB_WRAP(touchscreen_get_mode)
|
||||
{
|
||||
lua_pushinteger(L, rb->touchscreen_get_mode());
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
RB_WRAP(font_getstringsize)
|
||||
|
@ -638,6 +643,7 @@ static const luaL_Reg rocklib[] =
|
|||
#ifdef HAVE_TOUCHSCREEN
|
||||
R(action_get_touchscreen_press),
|
||||
R(touchscreen_set_mode),
|
||||
R(touchscreen_get_mode),
|
||||
#endif
|
||||
R(kbd_input),
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue