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
This commit is contained in:
Karl Kurbjun 2009-10-05 04:20:28 +00:00
parent fac05ab2f7
commit 714b4aaaf8
2 changed files with 7 additions and 17 deletions

View file

@ -385,11 +385,7 @@ long button_get_w_tmo(int ticks)
intptr_t button_get_data(void) intptr_t button_get_data(void)
{ {
#if defined(SIMULATOR)
return button_get_data_sdl();
#else
return button_data; return button_data;
#endif
} }
void button_init(void) void button_init(void)

View file

@ -1211,7 +1211,13 @@ void button_event(int key, bool pressed)
#ifdef HAVE_BUTTON_DATA #ifdef HAVE_BUTTON_DATA
int button_read_device(int* 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 #else
int button_read_device(void) int button_read_device(void)
{ {
@ -1264,20 +1270,8 @@ void mouse_tick_task(void)
printf("Mouse at: (%d, %d)\n", x, y); printf("Mouse at: (%d, %d)\n", x, y);
} }
} }
#endif #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) void button_init_sdl(void)
{ {
#ifdef HAVE_TOUCHSCREEN #ifdef HAVE_TOUCHSCREEN