Removed non-float versions of SDL render API drawing functions

This simplifies the API and removes a level of API translation between the int variants of the functions and the float implementation

Fixes https://github.com/libsdl-org/SDL/issues/6656
This commit is contained in:
Sam Lantinga
2022-12-31 11:19:32 -08:00
parent bf76fc6b05
commit 9c1a9ecb4b
29 changed files with 465 additions and 1119 deletions

View File

@@ -353,7 +353,8 @@ WatchJoystick(SDL_Joystick *joystick)
SDL_Texture *background_front, *background_back, *button, *axis, *marker = NULL;
const char *name = NULL;
SDL_Event event;
SDL_Rect dst;
SDL_FRect dst;
int texture_w, texture_h;
Uint8 alpha = 200, alpha_step = -1;
Uint64 alpha_ticks = 0;
SDL_JoystickID nJoystickID;
@@ -405,9 +406,11 @@ WatchJoystick(SDL_Joystick *joystick)
break;
}
dst.x = s_arrBindingDisplay[iElement].x;
dst.y = s_arrBindingDisplay[iElement].y;
SDL_QueryTexture(marker, NULL, NULL, &dst.w, &dst.h);
SDL_QueryTexture(marker, NULL, NULL, &texture_w, &texture_h);
dst.x = (float)s_arrBindingDisplay[iElement].x;
dst.y = (float)s_arrBindingDisplay[iElement].y;
dst.w = (float)texture_w;
dst.h = (float)texture_h;
if (SDL_GetTicks() >= (alpha_ticks + 5)) {
alpha_ticks = SDL_GetTicks();