summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Bridle <ben@derelict.engineering>2025-07-15 11:39:17 +1200
committerBen Bridle <ben@derelict.engineering>2025-07-15 11:39:17 +1200
commit738dd7801c8213228d39f83553a785f1219929c3 (patch)
treea4c8ea7e2ac0ddbcf0a0565b00a1956710d819f8
parent4e3ee9c9d61ff1e05a7881c92d4414a2ae1da784 (diff)
downloadbedrock-pc-738dd7801c8213228d39f83553a785f1219929c3.zip
Add logging for starting and promoting a dynamic emulator
This commit changes the message shown when starting the emulator with dynamic mode, to make it clear that the window will be hidden initially, and also adds a message for when the emulator window is made visible.
-rw-r--r--src/bin/br/main.rs2
-rw-r--r--src/emulators/graphical_emulator.rs1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/br/main.rs b/src/bin/br/main.rs
index 8e88caf..11505cb 100644
--- a/src/bin/br/main.rs
+++ b/src/bin/br/main.rs
@@ -133,7 +133,7 @@ fn main() {
if let Ok(phosphor) = Phosphor::new() {
match mode {
Mode::Dynamic => {
- info!("Starting graphical emulator");
+ info!("Starting graphical emulator (hidden)");
let mut emulator = GraphicalEmulator::new(config, debug);
emulator.load_program(&bytecode);
emulator.run(phosphor, false);
diff --git a/src/emulators/graphical_emulator.rs b/src/emulators/graphical_emulator.rs
index 7e75b61..3d7ea4a 100644
--- a/src/emulators/graphical_emulator.rs
+++ b/src/emulators/graphical_emulator.rs
@@ -261,6 +261,7 @@ impl WindowProgram for GraphicalEmulator {
if !self.visible {
if self.br.dev.input.accessed || self.br.dev.screen.accessed {
+ info!("Making window visible");
requests.write(Request::SetVisible(true));
self.visible = true;
}