feat: make 0xFF0F aware of joypad struct interrupt bool

This commit is contained in:
2021-03-20 21:21:39 -05:00
parent 36e572b783
commit b213a6e545
2 changed files with 25 additions and 15 deletions

View File

@@ -3,7 +3,17 @@ use bitfield::bitfield;
#[derive(Debug, Clone, Copy, Default)]
pub struct Joypad {
pub status: JoypadStatus,
pub interrupt: bool,
interrupt: bool,
}
impl Joypad {
pub fn interrupt(&self) -> bool {
self.interrupt
}
pub fn set_interrupt(&mut self, value: bool) {
self.interrupt = value;
}
}
bitfield! {