simulator
simulator copied to clipboard
Support for multiple Windows
- Version of embedded-graphics-simulator in use (if applicable): 0.5.0
- Version of embedded-graphics in use (if applicable): latest
Description of the problem/feature request/other
I have a device with two displays and I wanted to use the simulator as frontend for desktops, and framebuffer for the device itself (removing the with-sdl
flag when building embedded).
Because of the two displays, I wanted use two Window
objects, but I of course I got this error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "Cannot initialize `Sdl` more than once at a time."'
This doesn't seem to be very hard to fix, at least for my simple use case. There's already a PR (#37). I just wanted to file an issue to track progress of this.
Test case (if applicable)
let window_osd = Window::new(
"OSD",
&OutputSettingsBuilder::new()
.theme(BinaryColorTheme::OledBlue)
.build(),
);
let window_title = Window::new(
"Title",
&OutputSettingsBuilder::new()
.theme(BinaryColorTheme::OledBlue)
.build(),
);