Fixed VNC mouse, but the correct scale factor for X and Y has to be figured out.

This commit is contained in:
OBattler
2022-12-30 06:05:57 +01:00
parent 06a7e00af4
commit 06d4ae5595
3 changed files with 61 additions and 24 deletions

View File

@@ -88,6 +88,7 @@ static const device_t *mouse_curr;
static void *mouse_priv;
static int mouse_nbut;
static int (*mouse_dev_poll)(int x, int y, int z, int b, void *priv);
static void (*mouse_poll_ex)(void) = NULL;
#ifdef ENABLE_MOUSE_LOG
int mouse_do_log = ENABLE_MOUSE_LOG;
@@ -164,13 +165,22 @@ mouse_set_buttons(int buttons)
mouse_nbut = buttons;
}
void
mouse_set_poll_ex(void (*poll_ex)(void))
{
mouse_poll_ex = poll_ex;
}
void
mouse_process(void)
{
if (mouse_curr == NULL)
return;
mouse_poll();
if (mouse_poll_ex)
mouse_poll_ex();
else
mouse_poll();
if ((mouse_dev_poll != NULL) || (mouse_curr->poll != NULL)) {
if (mouse_curr->poll != NULL)