wgui: components base, anyhow event listener callbacks, 📦📎-fixes, typo fixes

This commit is contained in:
Aleksander
2025-08-13 17:10:00 +02:00
parent 93a3fee349
commit a79ed0839b
23 changed files with 104 additions and 72 deletions

View File

@@ -92,7 +92,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
};
let mut recreate = false;
let mut last_draw = std::time::Instant::now();
let mut scale = window.scale_factor() as f32;
@@ -302,8 +301,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let tgt = images[image_index as usize].clone();
last_draw = std::time::Instant::now();
let mut cmd_buf = gfx
.create_gfx_command_buffer(CommandBufferUsage::OneTimeSubmit)
.unwrap();
@@ -337,9 +334,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
profiler.end();
}
Event::AboutToWait => {
if last_draw.elapsed().as_millis() > 16 {
window.request_redraw();
}
// should be limited to vsync
window.request_redraw();
}
_ => (),
}