1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 13:50:04 -04:00

Make RawInput::time an Option

This commit is contained in:
Emil Ernerfeldt
2020-12-16 21:22:45 +01:00
parent 413f5fd37a
commit 2c766aa540
4 changed files with 51 additions and 16 deletions

View File

@@ -86,7 +86,7 @@ pub fn run(title: &str, mut storage: Box<dyn egui::app::Storage>, mut app: Box<d
event_loop.run(move |event, _, control_flow| {
let mut redraw = || {
let egui_start = Instant::now();
input_state.raw.time = start_time.elapsed().as_nanos() as f64 * 1e-9;
input_state.raw.time = Some(start_time.elapsed().as_nanos() as f64 * 1e-9);
input_state.raw.screen_size =
screen_size_in_pixels(&display) / input_state.raw.pixels_per_point.unwrap();