Skip to content

Commit

Permalink
Prevent bug with imgui delta time
Browse files Browse the repository at this point in the history
Ensure that the time we give to imgui is always positive.
  • Loading branch information
guillaumechereau committed Jul 17, 2024
1 parent 9e3d38c commit f1d2c73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ static void gui_iter(const inputs_t *inputs)

io.DisplayFramebufferScale = ImVec2(goxel.screen_scale,
goxel.screen_scale);
io.DeltaTime = goxel.delta_time;
io.DeltaTime = fmax(goxel.delta_time, 0.01);
io.ConfigDragClickToInputText = true;

if (inputs) {
Expand Down

0 comments on commit f1d2c73

Please sign in to comment.