1
0
Fork 0
forked from len0rd/rockbox

fix fs#8131 - if --debugwps is used with the sim, the mouse coordinates will be displayed in the console when it is clicked

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15565 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2007-11-11 01:50:18 +00:00
parent d430955e15
commit 50a8308ded
2 changed files with 11 additions and 0 deletions

View file

@ -820,6 +820,7 @@ intptr_t button_get_data(void)
}
#ifdef HAVE_TOUCHPAD
extern bool debug_wps;
void mouse_tick_task(void)
{
static int last_check = 0;
@ -831,6 +832,8 @@ void mouse_tick_task(void)
{
mouse_coords = (x<<16)|y;
button_event(BUTTON_TOUCHPAD, true);
if (debug_wps)
printf("Mouse at: (%d, %d)\n", x, y);
}
else if (lastbtn == BUTTON_TOUCHPAD)
{

View file

@ -107,6 +107,14 @@ void gui_message_loop(void)
button_event(event.key.keysym.sym, false);
sim_exit_irq_handler();
break;
#ifndef HAVE_TOUCHPAD
case SDL_MOUSEBUTTONDOWN:
if (debug_wps && event.button.button == 1)
{
printf("Mouse at: (%d, %d)\n", event.button.x, event.button.y);
}
break;
#endif
case SDL_QUIT:
done = true;
break;