From 223eba732e99d869fa0f65f98153642bd8d058a6 Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Sat, 31 Oct 2009 16:27:09 +0000 Subject: Simulator: Fix scrollwheel targets without HAVE_WHEEL_ACCELERATION defined git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23438 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/sdl/button.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'uisimulator') diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c index 3a6b9ce09f..da672f3c92 100644 --- a/uisimulator/sdl/button.c +++ b/uisimulator/sdl/button.c @@ -1243,10 +1243,16 @@ void button_event(int key, bool pressed) * implementation (look at button-e200.c for example if you are trying to * figure out why using button_get_data needed a hack before). */ -#if defined(BUTTON_SCROLL_FWD) && defined(BUTTON_SCROLL_BACK) +#if defined(HAVE_WHEEL_ACCELERATION) if((new_btn == BUTTON_SCROLL_FWD || new_btn == BUTTON_SCROLL_BACK) && pressed) { + /* Clear these buttons from the data - adding them to the queue is + * handled in the scrollwheel drivers for the targets. They do not + * store the scroll forward/back buttons in their button data for + * the button_read call. + */ + btn &= ~(BUTTON_SCROLL_FWD | BUTTON_SCROLL_BACK); queue_post(&button_queue, new_btn, 1<<24); } #endif -- cgit v1.2.3