summaryrefslogtreecommitdiff
path: root/src/bin/br/main.rs
diff options
context:
space:
mode:
authorBen Bridle <ben@derelict.engineering>2025-08-20 16:29:18 +1200
committerBen Bridle <ben@derelict.engineering>2025-08-20 16:29:18 +1200
commit6b85d719395d498ad1b8b218b18ed259ee864055 (patch)
tree094060f01ac32154d762c9e314f981bc0bbe027b /src/bin/br/main.rs
parent62e42e6082e8d7ff359d7b6bbdbd9eb1549956df (diff)
downloadbedrock-pc-6b85d719395d498ad1b8b218b18ed259ee864055.zip
Print event loop errors
Diffstat (limited to 'src/bin/br/main.rs')
-rw-r--r--src/bin/br/main.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/bin/br/main.rs b/src/bin/br/main.rs
index 11505cb..da11a18 100644
--- a/src/bin/br/main.rs
+++ b/src/bin/br/main.rs
@@ -130,8 +130,8 @@ fn main() {
symbols_path, name, identifier, title, icon,
};
- if let Ok(phosphor) = Phosphor::new() {
- match mode {
+ match Phosphor::new() {
+ Ok(phosphor) => match mode {
Mode::Dynamic => {
info!("Starting graphical emulator (hidden)");
let mut emulator = GraphicalEmulator::new(config, debug);
@@ -151,9 +151,9 @@ fn main() {
emulator.run();
}
}
- } else {
- match mode {
+ Err(err) => match mode {
Mode::Dynamic => {
+ eprintln!("EventLoopError: {err:?}");
info!("Could not start graphical event loop");
info!("Starting headless emulator");
let mut emulator = HeadlessEmulator::new(&config, debug);
@@ -161,6 +161,7 @@ fn main() {
emulator.run();
}
Mode::Graphical => {
+ eprintln!("EventLoopError: {err:?}");
fatal!("Could not start graphical event loop");
}
Mode::Headless => {