Exemple #1
0
/* Report a change in status down the driver chain.
 * We want to report the mouse as enabled if and only if the guest
 * is "using" it. That way, other devices (e.g. a PS/2 or USB mouse)
 * can receive mouse events when the bus mouse is disabled.
 * Enabling interrupts constitutes enabling the bus mouse. The mouse
 * is considered disabled if interrupts are disabled for several
 * consecutive mouse timer ticks; this is because the interrupt handler
 * in the guest typically temporarily disables interrupts and we do not
 * want to toggle the enabled/disabled state more often than necessary.
 */
static void bms_update_downstream_status(MouState *pThis)
{
    PPDMIMOUSECONNECTOR pDrv = pThis->Mouse.pDrv;
    bool fEnabled = !!pThis->mouse_enabled;
    pDrv->pfnReportModes(pDrv, fEnabled, false);
}
Exemple #2
0
/* Report a change in status down (or is it up?) the driver chain. */
static void ps2mSetDriverState(PPS2M pThis, bool fEnabled)
{
    PPDMIMOUSECONNECTOR pDrv = pThis->Mouse.pDrv;
    if (pDrv)
        pDrv->pfnReportModes(pDrv, fEnabled, false, false);
}