embedded-graphics / embedded-graphics/simulator

Support for multiple Windows

Open
#47 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
137
Forks
25
PR merge metrics
No merged PRs in 30d

Description

- 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)

```rust
let window_osd = Window::new(
"OSD",
&OutputSettingsBuilder::new()
.theme(BinaryColorTheme::OledBlue)
.build(),
);

let window_title = Window::new(
"Title",
&OutputSettingsBuilder::new()
.theme(BinaryColorTheme::OledBlue)
.build(),
);
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.