Skip to content

Commit

Permalink
animation: fix follow stuttering
Browse files Browse the repository at this point in the history
  • Loading branch information
larpon committed Dec 8, 2024
1 parent bff8648 commit 0356228
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/window.sdl.v
Original file line number Diff line number Diff line change
Expand Up @@ -553,15 +553,16 @@ pub fn (mut w Window) tick_and_render[T](mut ctx T) {

fn (mut w Window) variable_update(dt f64) {
w.timers.update(dt)
w.anims.update(dt)
if w.mode == .ui {
if w.timers.active() || w.anims.active() {
w.refresh(w.refresh_config)
}
}
}

fn (mut w Window) fixed_update(dt f64) {}
fn (mut w Window) fixed_update(dt f64) {
w.anims.update(dt)
}

pub fn (mut w Window) end_frame() {
w.record_frame() // NOTE: Compiled out unless using `-d shy_record`
Expand Down

0 comments on commit 0356228

Please sign in to comment.