mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 21:30:03 -04:00
egui_glium: run app code outside event loop to fix file dialogs (#631)
Previously app code was run from within the event loop which lead to file dialogs (e.g. using nfd2) to hang (see https://github.com/rust-windowing/winit/issues/1779) Now egui_glium polls for events and then runs the app code.
This commit is contained in:
@@ -68,6 +68,6 @@ pub fn start_web(canvas_id: &str, app: Box<dyn epi::App>) -> Result<(), wasm_bin
|
||||
|
||||
/// Call from `fn main` like this: `eframe::run_native(Box::new(MyEguiApp::default()))`
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub fn run_native(app: Box<dyn epi::App>, native_options: epi::NativeOptions) -> ! {
|
||||
pub fn run_native(app: Box<dyn epi::App>, native_options: epi::NativeOptions) {
|
||||
egui_glium::run(app, native_options)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user