Revision 09b26c5e vl.c

b/vl.c
474 474
static void *qemu_put_kbd_event_opaque;
475 475
static QEMUPutMouseEvent *qemu_put_mouse_event;
476 476
static void *qemu_put_mouse_event_opaque;
477
static int qemu_put_mouse_event_absolute;
477 478

  
478 479
void qemu_add_kbd_event_handler(QEMUPutKBDEvent *func, void *opaque)
479 480
{
......
481 482
    qemu_put_kbd_event = func;
482 483
}
483 484

  
484
void qemu_add_mouse_event_handler(QEMUPutMouseEvent *func, void *opaque)
485
void qemu_add_mouse_event_handler(QEMUPutMouseEvent *func, void *opaque, int absolute)
485 486
{
486 487
    qemu_put_mouse_event_opaque = opaque;
487 488
    qemu_put_mouse_event = func;
489
    qemu_put_mouse_event_absolute = absolute;
488 490
}
489 491

  
490 492
void kbd_put_keycode(int keycode)
......
502 504
    }
503 505
}
504 506

  
507
int kbd_mouse_is_absolute(void)
508
{
509
    return qemu_put_mouse_event_absolute;
510
}
511

  
505 512
/***********************************************************/
506 513
/* timers */
507 514

  
......
3242 3249
        dev = usb_mouse_init();
3243 3250
        if (!dev)
3244 3251
            return -1;
3252
    } else if (!strcmp(devname, "tablet")) {
3253
	dev = usb_tablet_init();
3254
	if (!dev)
3255
	    return -1;
3245 3256
    } else {
3246 3257
        return -1;
3247 3258
    }

Also available in: Unified diff