Skip to content

Commit bd2b831

Browse files
authored
Merge pull request #22 from ruby3141/dev/hudhook_update
bump hudhook into 0.7 and imgui into 0.12
2 parents 2c1f6bf + 6f6e88d commit bd2b831

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

djmaxplus/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ woff = "0.3.3"
2323
[dependencies]
2424
anyhow = { version = "1.0.81", features = ["backtrace"] }
2525
image = "0.25.1"
26-
imgui-sys = { version = "0.11.0", features = ["freetype", "use-vcpkg"] }
27-
imgui = { version = "0.11.0", features = ["freetype"] }
28-
hudhook = { git = "https://github.com/veeenu/hudhook.git", rev = "e34f748fb03c07ccfdd63aa5094271772ca02fce" }
26+
imgui-sys = { version = "0.12.0", features = ["freetype", "use-vcpkg"] }
27+
imgui = { version = "0.12.0", features = ["freetype"] }
28+
hudhook = "0.7.0"
2929
serde_with = "3.7.0"
3030
serde_yaml = "0.9.34"
3131
serde = { version = "1.0.197", features = ["serde_derive"] }

djmaxplus/src/components/runtime_info.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{path::PathBuf, time::Instant};
1+
use std::path::PathBuf;
22

33
use hudhook::util;
44

@@ -9,7 +9,6 @@ pub struct RuntimeInfo {
99
viewport_effective_width: f32,
1010
viewport_effective_offset_y: f32,
1111
viewport_height: f32,
12-
last_frame_start_time: Instant,
1312
was_anything_active: bool,
1413
}
1514

@@ -60,7 +59,6 @@ impl RuntimeInfo {
6059
viewport_effective_width: 0.,
6160
viewport_effective_offset_y: 0.,
6261
viewport_height: 0.,
63-
last_frame_start_time: Instant::now(),
6462
was_anything_active: false,
6563
}
6664
}
@@ -74,10 +72,6 @@ impl RuntimeInfo {
7472
self.viewport_effective_offset_y =
7573
((self.viewport_width() - self.viewport_effective_width()) / 2.).floor();
7674
}
77-
78-
let now = Instant::now();
79-
ctx.io_mut().delta_time = now.duration_since(self.last_frame_start_time).as_secs_f32();
80-
self.last_frame_start_time = now;
8175
}
8276

8377
pub fn render(&mut self, ui: &imgui::Ui) {

0 commit comments

Comments
 (0)