added debounce time

This commit is contained in:
asus
2024-01-13 14:38:02 +01:00
parent dabb4acf7a
commit a2f5f90fce
9 changed files with 80 additions and 37 deletions

View File

@@ -53,6 +53,8 @@ void init_offset(t_fdf *fdf)
void init_fdf(t_fdf *fdf)
{
struct timeval current_time;
fdf->win_size_x = 700;
fdf->win_size_y = 700;
fdf->img_size_x = fdf->win_size_x;
@@ -71,6 +73,8 @@ void init_fdf(t_fdf *fdf)
fdf->mov_x = (fdf->win_size_x - fdf->map_size_x) / 2;
fdf->mov_y = (fdf->win_size_y - fdf->map_size_y) / 2;
fdf->zoom = 0;
gettimeofday(&current_time, NULL);
fdf->last_keypress_time = current_time;
init_server(fdf);
draw_image(fdf);
}