One must use floating point division
Signed-off-by: Timo Kokkonen <kaapeli@itanic.dy.fi>
- aspect_ratio = ctx->screen->w / ctx->screen->h;
+ aspect_ratio = ctx->screen->w / (long double)ctx->screen->h;
ctx->origo_x += ctx->motion_x / ctx->zoom / ctx->screen->w;
ctx->origo_y += ctx->motion_y / ctx->zoom / ctx->screen->h;
ctx->motion_x = ctx->motion_y = 0;
ctx->origo_x += ctx->motion_x / ctx->zoom / ctx->screen->w;
ctx->origo_y += ctx->motion_y / ctx->zoom / ctx->screen->h;
ctx->motion_x = ctx->motion_y = 0;