X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fevents.c;h=20c6e3432e3dff614ea005e59cda0fb70c92a371;hp=e2d5ab9bdb47ef3fb81caed64112dd411b9e6a63;hb=f1dae0af49fa331f6fedc6cbdf59eed0909ae391;hpb=fcc90bcfa317ac5af938d552eb0a2df952801219 diff --git a/src/events.c b/src/events.c index e2d5ab9b..20c6e343 100644 --- a/src/events.c +++ b/src/events.c @@ -532,8 +532,8 @@ void HandleWindowEvent(WindowEvent *event) if (new_window_width != video.window_width || new_window_height != video.window_height) { - int new_xpercent = (100 * new_window_width / video.screen_width); - int new_ypercent = (100 * new_window_height / video.screen_height); + int new_xpercent = 100.0 * new_window_width / video.screen_width + .5; + int new_ypercent = 100.0 * new_window_height / video.screen_height + .5; // (extreme window scaling allowed, but cannot be saved permanently) video.window_scaling_percent = MIN(new_xpercent, new_ypercent); @@ -1233,6 +1233,8 @@ void HandleButton(int mx, int my, int button, int button_nr) } #endif + HandleGlobalAnimClicks(mx, my, button); + if (button_hold && game_status == GAME_MODE_PLAYING && tape.pausing) return;