From 18e0c4228a68296ad2f1a6d3387837317d317126 Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Sat, 1 Jun 2024 10:56:43 +1200 Subject: 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. --- src/emulator.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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 { -- cgit v1.2.3-70-g09d2