aboutsummaryrefslogtreecommitdiff
path: root/stockton-render/src/window.rs
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-08-25 17:44:23 +0100
committertcmal <me@aria.rip>2024-08-25 17:44:23 +0100
commitc52a05e6d3977efce6bd4479aa312dc90e0452e5 (patch)
treec383c910c1467b406e332651906e081c599d6951 /stockton-render/src/window.rs
parentd5b9ccd3d4a6e5b35a0411688bfb7113f5c7d631 (diff)
feat(render): proper error handling
Diffstat (limited to 'stockton-render/src/window.rs')
-rw-r--r--stockton-render/src/window.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/stockton-render/src/window.rs b/stockton-render/src/window.rs
index e8e9957..ea172bc 100644
--- a/stockton-render/src/window.rs
+++ b/stockton-render/src/window.rs
@@ -1,4 +1,4 @@
-use crate::Renderer;
+use crate::{error::full_error_display, Renderer};
use egui::Context;
use legion::systems::Runnable;
use log::debug;
@@ -6,7 +6,7 @@ use std::sync::Arc;
use stockton_levels::prelude::{MinBspFeatures, VulkanSystem};
use egui::{Output, PaintJobs, Pos2, RawInput, Ui};
-
+use log::error;
use stockton_input::{Action as KBAction, InputManager, Mouse};
use winit::event::{
@@ -162,7 +162,9 @@ pub fn _process_window_events<
while let Ok(event) = renderer.window_events.try_recv() {
match event {
WindowEvent::SizeChanged(w, h) => {
- renderer.resize();
+ if let Err(err) = renderer.resize() {
+ error!("{}", full_error_display(err));
+ };
ui_state.set_dimensions(w, h);
}
WindowEvent::CloseRequested => {