Skip to content

Commit

Permalink
Fix ImGui compilation against latest library
Browse files Browse the repository at this point in the history
  • Loading branch information
amaiorano committed Dec 5, 2024
1 parent fb118ce commit cc185ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/sdl_engine/src/imgui_impl/imgui_impl_sdl_gl3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ void ImGui_ImplSdlGL3_NewFrame(SDL_Window* window) {
Uint32 time = SDL_GetTicks();
double current_time = time / 1000.0;
io.DeltaTime = g_Time > 0.0 ? (float)(current_time - g_Time) : (float)(1.0f / 60.0f);
g_Time = current_time;
if (io.DeltaTime <= 0.0) {
io.DeltaTime = (float)(1.0f / 60.0f);
}

// Setup inputs
// (we already got mouse wheel, keyboard keys & characters from SDL_PollEvent())
Expand Down

0 comments on commit cc185ae

Please sign in to comment.