1
0
Fork 0
forked from len0rd/rockbox

Add touchscreen_get_mode() to plugin and lua.

Change-Id: I44b8693c689da00f57c14622f4ba3dc554dbbfc9
This commit is contained in:
Thomas Martitz 2012-01-26 23:37:27 +01:00
parent f4954c4a9b
commit b8439f2aea
3 changed files with 8 additions and 0 deletions

View file

@ -326,6 +326,7 @@ static const struct plugin_api rockbox_api = {
#endif #endif
#ifdef HAVE_TOUCHSCREEN #ifdef HAVE_TOUCHSCREEN
touchscreen_set_mode, touchscreen_set_mode,
touchscreen_get_mode,
#endif #endif
#ifdef HAVE_BUTTON_LIGHT #ifdef HAVE_BUTTON_LIGHT

View file

@ -413,6 +413,7 @@ struct plugin_api {
#endif #endif
#ifdef HAVE_TOUCHSCREEN #ifdef HAVE_TOUCHSCREEN
void (*touchscreen_set_mode)(enum touchscreen_mode); void (*touchscreen_set_mode)(enum touchscreen_mode);
enum touchscreen_mode (*touchscreen_get_mode)(void);
#endif #endif
#ifdef HAVE_BUTTON_LIGHT #ifdef HAVE_BUTTON_LIGHT
void (*buttonlight_set_timeout)(int value); void (*buttonlight_set_timeout)(int value);

View file

@ -425,6 +425,11 @@ RB_WRAP(touchscreen_set_mode)
rb->touchscreen_set_mode(mode); rb->touchscreen_set_mode(mode);
return 0; return 0;
} }
RB_WRAP(touchscreen_get_mode)
{
lua_pushinteger(L, rb->touchscreen_get_mode());
return 1;
}
#endif #endif
RB_WRAP(font_getstringsize) RB_WRAP(font_getstringsize)
@ -638,6 +643,7 @@ static const luaL_Reg rocklib[] =
#ifdef HAVE_TOUCHSCREEN #ifdef HAVE_TOUCHSCREEN
R(action_get_touchscreen_press), R(action_get_touchscreen_press),
R(touchscreen_set_mode), R(touchscreen_set_mode),
R(touchscreen_get_mode),
#endif #endif
R(kbd_input), R(kbd_input),