mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-12 15:31:09 +00:00
Don't clear the mouse data full flag until both registers have been read.
This commit is contained in:
parent
e6dc39f6f0
commit
6cf9099ce1
@ -74,10 +74,13 @@ uint8_t GLU::get_mouse_data() {
|
||||
// b7: 1 = button is up; 0 = button is down.
|
||||
// b6: delta sign bit; 1 = negative.
|
||||
// b5–b0: mouse delta.
|
||||
status_ &= ~uint8_t(CPUFlags::MouseDataFull);
|
||||
|
||||
const uint8_t result = registers_[visible_mouse_register_];
|
||||
visible_mouse_register_ += (visible_mouse_register_ == 2);
|
||||
if(visible_mouse_register_ == 2) {
|
||||
++visible_mouse_register_;
|
||||
} else {
|
||||
status_ &= ~uint8_t(CPUFlags::MouseDataFull);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user