Fixed a bug where get_time() returned bogus values

This commit is contained in:
Antoine Gersant 2019-04-17 00:06:49 -07:00
parent 09bff25346
commit 21a2b1c936
2 changed files with 2 additions and 2 deletions

View File

@ -1033,7 +1033,7 @@ extern "C" {
pub fn igSetItemAllowOverlap();
pub fn igIsRectVisible(size: ImVec2) -> bool;
pub fn igIsRectVisibleVec2(rect_min: ImVec2, rect_max: ImVec2) -> bool;
pub fn igGetTime() -> c_float;
pub fn igGetTime() -> c_double;
pub fn igGetFrameCount() -> c_int;
pub fn igGetOverlayDrawList() -> *mut ImDrawList;
pub fn igGetDrawListSharedData() -> *mut ImDrawListSharedData;

View File

@ -390,7 +390,7 @@ impl ImGui {
sys::ImGuiIO_AddInputCharactersUTF8(self.io_mut(), buf.as_ptr() as *const _);
}
}
pub fn get_time(&self) -> f32 {
pub fn get_time(&self) -> f64 {
unsafe { sys::igGetTime() }
}
pub fn get_frame_count(&self) -> i32 {