PistonDevelopers / glutin_window

A Piston window back-end using the Glutin library
MIT License
25 stars 40 forks source link

Panic when creating basic fullscreen window #210

Open FlashOnFire opened 1 year ago

FlashOnFire commented 1 year ago

Panic when creating a simple fullscreen window

Tested using a simple code in an empty project to isolate :

use piston_window::{PistonWindow, WindowSettings};

fn main() {
    let window: PistonWindow = WindowSettings::new("aaa", [1920, 1080])
        .fullscreen(true)
        .build()
        .unwrap();
}

Result : image

I managed to find where both of the event loops were created :

First : here at the beginning of the creation of the GlutinWindow Permalink image

And here in the window_builder_from_settings function Permalink image

The if check explains why it doesn't happen when using non fullscreen window