Use floorf instead of floor.

This commit is contained in:
joris 2013-07-25 17:42:05 +02:00
parent ab48443be5
commit 8115d4ae84

View file

@ -825,8 +825,8 @@ static void SdlDoEvent(const EventCallback &callbacks, SDL_Event &event)
#if (defined(USE_OPENGL) || defined(USE_GLES)) #if (defined(USE_OPENGL) || defined(USE_GLES))
// Scale mouse-coordinates to viewport // Scale mouse-coordinates to viewport
if (ZoomNoResize && (event.type & (SDL_MOUSEBUTTONUP | SDL_MOUSEBUTTONDOWN | SDL_MOUSEMOTION))) { if (ZoomNoResize && (event.type & (SDL_MOUSEBUTTONUP | SDL_MOUSEBUTTONDOWN | SDL_MOUSEMOTION))) {
event.button.x = (Uint16)floor(event.button.x * float(Video.Width) / Video.ViewportWidth); event.button.x = (Uint16)floorf(event.button.x * float(Video.Width) / Video.ViewportWidth);
event.button.y = (Uint16)floor(event.button.y * float(Video.Height) / Video.ViewportHeight); event.button.y = (Uint16)floorf(event.button.y * float(Video.Height) / Video.ViewportHeight);
} }
#endif #endif
switch (event.type) { switch (event.type) {