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:
parent
d430955e15
commit
50a8308ded
2 changed files with 11 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue