mirror of
https://github.com/emilk/egui.git
synced 2026-06-27 07:03:14 -04:00
eframe error handling (#2433)
* eframe::run_native: return errors instead of crashing * Detect and handle glutin errors * egui_demo_app: silence wgpu log spam * Add trace logs for why eframe is shutting down * Fix: only save App state once on Mac * Handle Winit failure * Log where we load app state from * Don't panic on zero-sized window * Clamp loaded window size to not be too tiny to see * Simplify code: more shared code in window_builder * Improve code readability * Fix wasm32 build * fix android * Update changelog
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
use eframe::egui;
|
||||
|
||||
fn main() {
|
||||
fn main() -> Result<(), eframe::EframeError> {
|
||||
let options = eframe::NativeOptions {
|
||||
initial_window_size: Some(egui::vec2(320.0, 240.0)),
|
||||
..Default::default()
|
||||
@@ -11,7 +11,7 @@ fn main() {
|
||||
"egui example: custom font",
|
||||
options,
|
||||
Box::new(|cc| Box::new(MyApp::new(cc))),
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
fn setup_custom_fonts(ctx: &egui::Context) {
|
||||
|
||||
Reference in New Issue
Block a user