Support for multiple Windows

Open
#47 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
desktop

Research direction

Start at the simulator's Window entry point and reproduce the issue with the two Window objects shown in the report. Review PR #37 for the existing direction, then verify that two displays can be created without the SDL initialization panic while preserving the single-window use case.

Written by the indexing model from the issue text.

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)

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

        let window_title = Window::new(
            "Title",
            &OutputSettingsBuilder::new()
                .theme(BinaryColorTheme::OledBlue)
                .build(),
        );
Dominant language
Rust
Stars
137
Forks
25
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from embedded-graphics/simulator

All issues in embedded-graphics/simulator

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.