mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
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:
parent
fac05ab2f7
commit
714b4aaaf8
2 changed files with 7 additions and 17 deletions
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue