Skip to content

Support for multiple Windows #47

@hansl

Description

@hansl
  • 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(),
        );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions