diff options
| author | Karl Kurbjun <kkurbjun@gmail.com> | 2009-10-05 04:20:28 +0000 |
|---|---|---|
| committer | Karl Kurbjun <kkurbjun@gmail.com> | 2009-10-05 04:20:28 +0000 |
| commit | 714b4aaaf830a1707463984ed74d8d94966b75dc (patch) | |
| tree | f6074101fa403d31d5077000d610552da05f9e0f | |
| parent | fac05ab2f755318bb42ce0eca55eb4061358bad1 (diff) | |
| download | rockbox-714b4aaaf830a1707463984ed74d8d94966b75dc.zip rockbox-714b4aaaf830a1707463984ed74d8d94966b75dc.tar.gz rockbox-714b4aaaf830a1707463984ed74d8d94966b75dc.tar.bz2 rockbox-714b4aaaf830a1707463984ed74d8d94966b75dc.tar.xz | |
Simulator buttons: Remove a hack and make brickmania work the same as on target.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22936 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/drivers/button.c | 4 | ||||
| -rw-r--r-- | uisimulator/sdl/button.c | 20 |
2 files changed, 7 insertions, 17 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index 088ba0a..71cd472 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c @@ -385,11 +385,7 @@ long button_get_w_tmo(int ticks) intptr_t button_get_data(void) { -#if defined(SIMULATOR) - return button_get_data_sdl(); -#else return button_data; -#endif } void button_init(void) diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c index 5bda8a3..ee0a240 100644 --- a/uisimulator/sdl/button.c +++ b/uisimulator/sdl/button.c @@ -1211,7 +1211,13 @@ void button_event(int key, bool pressed) #ifdef HAVE_BUTTON_DATA int button_read_device(int* data) { - (void)data; +#if defined(HAVE_TOUCHSCREEN) + *data=mouse_coords; +#else + /* pass scrollwheel acceleration to the button driver */ + *data = 1<<24; +#endif + #else int button_read_device(void) { @@ -1264,19 +1270,7 @@ void mouse_tick_task(void) printf("Mouse at: (%d, %d)\n", x, y); } } - -#endif - -intptr_t button_get_data_sdl(void) -{ -#ifdef HAVE_TOUCHSCREEN - /* pass the mouse coordinates to the button driver */ - return mouse_coords; -#else - /* pass scrollwheel acceleration to the button driver */ - return 1<<24; #endif -} void button_init_sdl(void) { |