SDL/VisualC
Sam Lantinga 7f23d71b6a Added SDL_modf() and SDL_modff()
This function is useful for accumulating relative mouse motion if you want to only handle whole pixel movement.
e.g.
static float dx_frac, dy_frac;
float dx, dy;

/* Accumulate new motion with previous sub-pixel motion */
dx = event.motion.xrel + dx_frac;
dy = event.motion.yrel + dy_frac;

/* Split the integral and fractional motion, dx and dy will contain whole pixel deltas */
dx_frac = SDL_modff(dx, &dx);
dy_frac = SDL_modff(dy, &dy);
if (dx != 0.0f || dy != 0.0f) {
    ...
}
2022-12-29 23:12:19 -08:00
..
SDL Added SDL_modf() and SDL_modff() 2022-12-29 23:12:19 -08:00
SDL_test Rename SDLmain to SDL_main and SDLtest to SDL_test for consistency with other SDL libraries 2022-11-28 10:57:59 -08:00
pkg-support/cmake cmake: add SDL3 to include path 2022-12-29 09:01:56 -08:00
tests SDL API renaming: SDL_gamecontroller.h 2022-12-27 09:47:24 -08:00
SDL.sln SDL API renaming: SDL_gamecontroller.h 2022-12-27 09:47:24 -08:00
clean.sh Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00