diff options
author | Ben Bridle <bridle.benjamin@gmail.com> | 2024-06-01 10:56:43 +1200 |
---|---|---|
committer | Ben Bridle <bridle.benjamin@gmail.com> | 2024-06-01 10:56:43 +1200 |
commit | 18e0c4228a68296ad2f1a6d3387837317d317126 (patch) | |
tree | 1191306ddd7449ba73ad7220da95f9618befc53a | |
parent | 241175559706f4b6a9807013f8075a5238643251 (diff) | |
download | bedrock-pc-18e0c4228a68296ad2f1a6d3387837317d317126.zip |
Flush stream device before printing debug information
Without this, text pushed to the stream device before a debug
instruction would often display after the output for that debug
instruction.
-rw-r--r-- | src/emulator.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/emulator.rs b/src/emulator.rs index 125cf03..47d4bd6 100644 --- a/src/emulator.rs +++ b/src/emulator.rs @@ -50,6 +50,8 @@ impl BedrockEmulator { } pub fn debug(&mut self, variant: DebugVariant) { + self.vm.dev.stream.flush_local(); + macro_rules! yellow {()=>{eprint!("\x1b[33m")};} macro_rules! normal {()=>{eprint!("\x1b[0m")};} macro_rules! print_stack { |