summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2012-01-27 00:06:51 +0100
committerThomas Martitz <kugel@rockbox.org>2012-01-27 09:15:05 +0100
commit7c623d577beea6fce3eadaa697d5e6835d820bdf (patch)
tree56c9dedc3cc60c004cf06fbae5a3143557e5bdc3
parentc406f945924412f4c472413b578e396036e63626 (diff)
downloadrockbox-7c623d577beea6fce3eadaa697d5e6835d820bdf.zip
rockbox-7c623d577beea6fce3eadaa697d5e6835d820bdf.tar.gz
rockbox-7c623d577beea6fce3eadaa697d5e6835d820bdf.tar.bz2
rockbox-7c623d577beea6fce3eadaa697d5e6835d820bdf.tar.xz
Use PLA in boomshine.lua instead of the awkward kbd_input context. This enables it on RaaA.
Change-Id: I616bb39c1e785e39e9369d2ccef45477911bb5a3
-rw-r--r--apps/plugins/SOURCES.app_build4
-rw-r--r--apps/plugins/SUBDIRS.app_build1
-rw-r--r--apps/plugins/boomshine.lua14
3 files changed, 12 insertions, 7 deletions
diff --git a/apps/plugins/SOURCES.app_build b/apps/plugins/SOURCES.app_build
index 8a94e67..d33f995 100644
--- a/apps/plugins/SOURCES.app_build
+++ b/apps/plugins/SOURCES.app_build
@@ -11,6 +11,10 @@ search.c
sort.c
theme_remove.c
vbrfix.c
+#if PLUGIN_BUFFER_SIZE >= 0x80000
+boomshine.lua
+#endif
+
#ifdef HAVE_TEST_PLUGINS /* enable in advanced build options */
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
diff --git a/apps/plugins/SUBDIRS.app_build b/apps/plugins/SUBDIRS.app_build
index 32fda68..e9f9253 100644
--- a/apps/plugins/SUBDIRS.app_build
+++ b/apps/plugins/SUBDIRS.app_build
@@ -6,6 +6,7 @@
/* For all targets with a bitmap display and a touchscreen
* In fact, most of the plugins aren't supposed to be used on a touch(mouse) device
*/
+lua
#ifdef HAVE_LCD_BITMAP
#if CONFIG_CODEC == SWCODEC && PLUGIN_BUFFER_SIZE > 0x20000
diff --git a/apps/plugins/boomshine.lua b/apps/plugins/boomshine.lua
index 0d0f9c5..fe73e8c 100644
--- a/apps/plugins/boomshine.lua
+++ b/apps/plugins/boomshine.lua
@@ -148,15 +148,15 @@ function Cursor:do_action(action)
if action == rb.actions.ACTION_TOUCHSCREEN and HAS_TOUCHSCREEN then
_, self.x, self.y = rb.action_get_touchscreen_press()
return true
- elseif action == rb.actions.ACTION_KBD_SELECT then
+ elseif action == rb.actions.PLA_SELECT then
return true
- elseif (action == rb.actions.ACTION_KBD_RIGHT) then
+ elseif (action == rb.actions.PLA_RIGHT) then
self.x = self.x + self.size
- elseif (action == rb.actions.ACTION_KBD_LEFT) then
+ elseif (action == rb.actions.PLA_LEFT) then
self.x = self.x - self.size
- elseif (action == rb.actions.ACTION_KBD_UP) then
+ elseif (action == rb.actions.PLA_UP) then
self.y = self.y - self.size
- elseif (action == rb.actions.ACTION_KBD_DOWN) then
+ elseif (action == rb.actions.PLA_DOWN) then
self.y = self.y + self.size
end
@@ -233,8 +233,8 @@ function start_round(level, goal, nrBalls, total)
end
-- Check for actions
- local action = rb.get_action(rb.contexts.CONTEXT_KEYBOARD, 0)
- if(action == rb.actions.ACTION_KBD_ABORT) then
+ local action = rb.get_plugin_action(0)
+ if action == rb.actions.PLA_EXIT or action == rb.actions.PLA_CANCEL then
exit = true
break
end