pub fn ack_interrupt(&mut self) -> Result<bool> {
        let ack = self.header.ack_interrupt();
        if !ack {
            return Ok(false);
        }
        while let Ok((token, _)) = self.event_queue.pop_used() {
            let event = &mut self.event_buf[token as usize];
            match EventRepr::from(*event) {
                EventRepr::RelX(dx) => self.x += dx,
                EventRepr::RelY(dy) => self.y += dy,
                r => warn!("{:?}", r),
            }
            // requeue
            self.event_queue.add(&[], &[event.as_buf_mut()])?;
        }
        Ok(true)
    }
/// Acknowledge interrupt and process events.
Acknowledge interrupt and process events.
Acknowledge interrupt and process events .
pub fn ack_interrupt(&mut self) -> Result<bool> {
        let ack = self.header.ack_interrupt();
        if !ack {
            return Ok(false);
        }
        while let Ok((token, _)) = self.event_queue.pop_used() {
            let event = &mut self.event_buf[token as usize];
            match EventRepr::from(*event) {
                EventRepr::RelX(dx) => self.x += dx,
                EventRepr::RelY(dy) => self.y += dy,
                r => warn!("{:?}", r),
            }
            // requeue
            self.event_queue.add(&[], &[event.as_buf_mut()])?;
        }
        Ok(true)
    }
pub fn ack_interrupt ( & mut self ) -> Result < bool > { let ack = self . header . ack_interrupt ( ) ; if ! ack { return Ok ( false ) ; } while let Ok ( ( token , _ ) ) = self . event_queue . pop_used ( ) { let event = & mut self . event_buf [ token as usize ] ; match EventRepr :: from ( * event ) { EventRepr :: RelX ( dx ) => self . x += dx , EventRepr :: RelY ( dy ) => self . y += dy , r => warn ! ( " " r ) , } // requeue self . event_queue . add ( & [ ] , & [ event . as_buf_mut ( ) ] ) ? ; } Ok ( true ) }
Acknowledge interrupt and process events.
Acknowledge interrupt and process events .
&mut self
&mut self