Skip to content

Commit

Permalink
Smoother drag and animations
Browse files Browse the repository at this point in the history
Change-Id: Ic2477f129ed190eed570d38bf22d0a78931a6e49
  • Loading branch information
julbra committed Mar 9, 2017
1 parent 1cb4e2f commit d0da5be
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/drawing-backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ gboolean auto_move(chess_piece *piece, int new_col, int new_row, int check_legal
}
}

// points_to_plot *= 7.0f;
points_to_plot *= 2.0f;
// points_to_plot /= 3.0f;

double **anim_steps;
Expand Down Expand Up @@ -1352,8 +1352,9 @@ gboolean auto_move(chess_piece *piece, int new_col, int new_row, int check_legal

g_hash_table_insert(anims_map, animation->piece, animation);

// g_timeout_add(1000/120, animate_one_step, animation);
g_timeout_add(1000/60, animate_one_step, animation);
// g_timeout_add(1000/240, animate_one_step, animation);
// g_timeout_add(1000/60, animate_one_step, animation);
g_timeout_add(8, animate_one_step, animation);
return TRUE;
}

Expand Down Expand Up @@ -2114,7 +2115,8 @@ void *process_moves(void *ptr) {

}
// usleep(1000000/120);
usleep(1000000/60);
// usleep(1000000/60);
usleep(3000);
}
return 0;
}
Expand Down

0 comments on commit d0da5be

Please sign in to comment.