mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 22:30:03 -04:00
Better error reporting
This commit is contained in:
@@ -261,7 +261,7 @@ pub fn handle_app_output(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if drag_window {
|
if drag_window {
|
||||||
let _ = window.drag_window();
|
window.drag_window().ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(always_on_top) = always_on_top {
|
if let Some(always_on_top) = always_on_top {
|
||||||
|
|||||||
@@ -1220,7 +1220,7 @@ mod glow_integration {
|
|||||||
&output.textures_delta,
|
&output.textures_delta,
|
||||||
);
|
);
|
||||||
crate::profile_scope!("swap_buffers");
|
crate::profile_scope!("swap_buffers");
|
||||||
let _ = window
|
if let Err(err) = window
|
||||||
.gl_surface
|
.gl_surface
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.expect("failed to get surface to swap buffers")
|
.expect("failed to get surface to swap buffers")
|
||||||
@@ -1229,7 +1229,10 @@ mod glow_integration {
|
|||||||
.current_gl_context
|
.current_gl_context
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.expect("failed to get current context to swap buffers"),
|
.expect("failed to get current context to swap buffers"),
|
||||||
);
|
)
|
||||||
|
{
|
||||||
|
log::error!("swap_buffers failed: {err}");
|
||||||
|
}
|
||||||
winit_state.handle_platform_output(&win, pair.this, egui_ctx, output.platform_output);
|
winit_state.handle_platform_output(&win, pair.this, egui_ctx, output.platform_output);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1545,7 +1548,7 @@ mod glow_integration {
|
|||||||
|
|
||||||
{
|
{
|
||||||
crate::profile_scope!("swap_buffers");
|
crate::profile_scope!("swap_buffers");
|
||||||
let _ = viewport
|
if let Err(err) = viewport
|
||||||
.borrow()
|
.borrow()
|
||||||
.gl_surface
|
.gl_surface
|
||||||
.as_ref()
|
.as_ref()
|
||||||
@@ -1556,7 +1559,10 @@ mod glow_integration {
|
|||||||
.current_gl_context
|
.current_gl_context
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.expect("failed to get current context to swap buffers"),
|
.expect("failed to get current context to swap buffers"),
|
||||||
);
|
)
|
||||||
|
{
|
||||||
|
log::error!("swap_buffers failed: {err}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
integration.post_present(&viewport.borrow().window.as_ref().unwrap().borrow());
|
integration.post_present(&viewport.borrow().window.as_ref().unwrap().borrow());
|
||||||
@@ -1693,7 +1699,9 @@ mod glow_integration {
|
|||||||
|
|
||||||
winit::event::Event::MainEventsCleared => {
|
winit::event::Event::MainEventsCleared => {
|
||||||
if let Some(running) = self.running.borrow().as_ref() {
|
if let Some(running) = self.running.borrow().as_ref() {
|
||||||
let _ = running.glutin_ctx.borrow_mut().on_resume(event_loop);
|
if let Err(err) = running.glutin_ctx.borrow_mut().on_resume(event_loop) {
|
||||||
|
log::warn!("on_resume failed {err}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
EventResult::Wait
|
EventResult::Wait
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user