summaryrefslogtreecommitdiffstats
path: root/apps/plugins/rockboy/sys_rockbox.c
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2007-06-24 16:00:55 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2007-06-24 16:00:55 +0000
commit78c45530fff6100240d08be77858350632000de9 (patch)
tree38d312e754cf87e1ea45ca1faf72fdd2d546fde2 /apps/plugins/rockboy/sys_rockbox.c
parent16ca78db033f86c482cceb25dd1eee32aae2ecfc (diff)
downloadrockbox-78c45530fff6100240d08be77858350632000de9.tar.gz
rockbox-78c45530fff6100240d08be77858350632000de9.tar.bz2
rockbox-78c45530fff6100240d08be77858350632000de9.zip
Sound improvements for rockboy - players now sync the sound (The gigabeat now plays at a steady 60 fps as long as the frameskip is set properly). If a new sample is not available a blank buffer is used. All devices use 44.1 kHz for gameboy sound now so no more high pitched sounds. Added a screen rotation option. Removed unscaled code for devices with a screensize smaller than the gameboy. All buttons are now configurable. Scroll wheel devices still have button configuration problems though.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13698 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/rockboy/sys_rockbox.c')
-rw-r--r--apps/plugins/rockboy/sys_rockbox.c43
1 files changed, 9 insertions, 34 deletions
diff --git a/apps/plugins/rockboy/sys_rockbox.c b/apps/plugins/rockboy/sys_rockbox.c
index 6cbbe523f7..60cac0a88d 100644
--- a/apps/plugins/rockboy/sys_rockbox.c
+++ b/apps/plugins/rockboy/sys_rockbox.c
@@ -24,36 +24,11 @@
#include "hw.h"
#include "config.h"
-#if (CONFIG_KEYPAD == IPOD_4G_PAD)
-
-#define ROCKBOY_PAD_LEFT BUTTON_LEFT
-#define ROCKBOY_PAD_RIGHT BUTTON_RIGHT
-#define ROCKBOY_PAD_UP BUTTON_MENU
-#define ROCKBOY_PAD_DOWN BUTTON_PLAY
-
-#elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
-
-#define ROCKBOY_PAD_LEFT BUTTON_LEFT
-#define ROCKBOY_PAD_RIGHT BUTTON_RIGHT
-#define ROCKBOY_PAD_UP BUTTON_SCROLL_UP
-#define ROCKBOY_PAD_DOWN BUTTON_SCROLL_DOWN
-
-#elif (CONFIG_KEYPAD == SANSA_E200_PAD)
+#if (CONFIG_KEYPAD == SANSA_E200_PAD)
#define ROCKBOY_SCROLLWHEEL
#define ROCKBOY_SCROLLWHEEL_CC BUTTON_SCROLL_UP
#define ROCKBOY_SCROLLWHEEL_CW BUTTON_SCROLL_DOWN
-#define ROCKBOY_PAD_LEFT BUTTON_LEFT
-#define ROCKBOY_PAD_RIGHT BUTTON_RIGHT
-#define ROCKBOY_PAD_UP BUTTON_UP
-#define ROCKBOY_PAD_DOWN BUTTON_DOWN
-
-#else
-
-#define ROCKBOY_PAD_LEFT BUTTON_LEFT
-#define ROCKBOY_PAD_RIGHT BUTTON_RIGHT
-#define ROCKBOY_PAD_UP BUTTON_UP
-#define ROCKBOY_PAD_DOWN BUTTON_DOWN
#endif
@@ -159,10 +134,10 @@ void ev_poll(void)
#else
if(released) {
ev.type = EV_RELEASE;
- if(released & ROCKBOY_PAD_LEFT) { ev.code=PAD_LEFT; ev_postevent(&ev); }
- if(released & ROCKBOY_PAD_RIGHT) {ev.code=PAD_RIGHT; ev_postevent(&ev);}
- if(released & ROCKBOY_PAD_DOWN) { ev.code=PAD_DOWN; ev_postevent(&ev); }
- if(released & ROCKBOY_PAD_UP) { ev.code=PAD_UP; ev_postevent(&ev); }
+ if(released & options.LEFT) { ev.code=PAD_LEFT; ev_postevent(&ev); }
+ if(released & options.RIGHT) {ev.code=PAD_RIGHT; ev_postevent(&ev);}
+ if(released & options.DOWN) { ev.code=PAD_DOWN; ev_postevent(&ev); }
+ if(released & options.UP) { ev.code=PAD_UP; ev_postevent(&ev); }
if(released & options.A) { ev.code=PAD_A; ev_postevent(&ev); }
if(released & options.B) { ev.code=PAD_B; ev_postevent(&ev); }
if(released & options.START) {
@@ -176,10 +151,10 @@ void ev_poll(void)
}
if(pressed) { /* button press */
ev.type = EV_PRESS;
- if(pressed & ROCKBOY_PAD_LEFT) { ev.code=PAD_LEFT; ev_postevent(&ev); }
- if(pressed & ROCKBOY_PAD_RIGHT) { ev.code=PAD_RIGHT; ev_postevent(&ev);}
- if(pressed & ROCKBOY_PAD_DOWN) { ev.code=PAD_DOWN; ev_postevent(&ev); }
- if(pressed & ROCKBOY_PAD_UP) { ev.code=PAD_UP; ev_postevent(&ev); }
+ if(pressed & options.LEFT) { ev.code=PAD_LEFT; ev_postevent(&ev); }
+ if(pressed & options.RIGHT) { ev.code=PAD_RIGHT; ev_postevent(&ev);}
+ if(pressed & options.DOWN) { ev.code=PAD_DOWN; ev_postevent(&ev); }
+ if(pressed & options.UP) { ev.code=PAD_UP; ev_postevent(&ev); }
if(pressed & options.A) { ev.code=PAD_A; ev_postevent(&ev); }
if(pressed & options.B) { ev.code=PAD_B; ev_postevent(&ev); }
if(pressed & options.START) {