Merge pull request #213 from agersant/get-time

Fixed a bug where get_time() returned bogus values
This commit is contained in:
Joonas Javanainen 2019-04-17 21:06:49 +03:00 committed by GitHub
commit 6d68da2d9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 {