diff options
-rw-r--r-- | src/devices.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/devices.rs b/src/devices.rs index 4ba29a8..e0c4280 100644 --- a/src/devices.rs +++ b/src/devices.rs @@ -58,10 +58,15 @@ impl StandardDevices { }; } self.clock.update_timers(); - test_wake!(self.clock.wake_flag, 0x3, 0x1000); + // The order here is important. If clock comes first, it could + // block out all other events with a fast enough recurring timer. + // It might be preferable to implement a queue system, so that + // the flags are tested in the opposite order to how recently + // they were matched. test_wake!(self.input.wake_flag, 0x4, 0x0800); test_wake!(self.screen.wake_flag, 0x5, 0x0400); test_wake!(self.stream.wake_flag, 0x8, 0x0080); + test_wake!(self.clock.wake_flag, 0x3, 0x1000); return false; } } |