Fix (unintentional) linkage of HAVE_BUTTON_DATA with HAVE_TOUCHSCREEN

Defining HAVE_BUTTON_DATA without simultaneously defining HAVE_TOUCHSCREEN
caused compile errors. (I need them separated for a scrollstrip driver.)

Change-Id: I945d3437d840035ccc0c147f8155029b403c6ec2
Reviewed-on: http://gerrit.rockbox.org/771
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
This commit is contained in:
Sebastian Leonhardt 2014-03-14 16:21:34 +01:00 committed by Thomas Martitz
parent 915bc09996
commit 1cf17436b7
2 changed files with 6 additions and 2 deletions

View file

@ -444,10 +444,14 @@ static void button_event(int key, bool pressed)
else
btn &= ~new_btn;
}
#if defined(HAVE_BUTTON_DATA) && defined(HAVE_TOUCHSCREEN)
#if defined(HAVE_BUTTON_DATA)
int button_read_device(int* data)
{
#if defined(HAVE_TOUCHSCREEN)
*data = mouse_coords;
#else
(void) *data; /* suppress compiler warnings */
#endif
#else
int button_read_device(void)
{