Build with -Wfloat-conversion + fix all warnings

This commit is contained in:
Anonymous Maarten
2024-06-03 23:33:29 +02:00
committed by GitHub
parent 17c459e384
commit a919774fe4
38 changed files with 199 additions and 203 deletions

View File

@@ -688,7 +688,7 @@ static int SDL_SYS_ToDirection(Uint16 *dest, const SDL_HapticDirection *src)
} else if (!src->dir[0]) {
*dest = (src->dir[1] >= 0 ? 0x8000 : 0);
} else {
float f = SDL_atan2(src->dir[1], src->dir[0]); /* Ideally we'd use fixed point math instead of floats... */
float f = SDL_atan2f(src->dir[1], src->dir[0]); /* Ideally we'd use fixed point math instead of floats... */
/*
SDL_atan2 takes the parameters: Y-axis-value and X-axis-value (in that order)
- Y-axis-value is the second coordinate (from center to SOUTH)