mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-25 08:44:13 +00:00
SDL API renaming: SDL_rect.h
Fixes https://github.com/libsdl-org/SDL/issues/6887
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -443,7 +443,7 @@ static SDL_GamepadButton FindButtonAtPosition(int x, int y)
|
||||
rect.y = button_positions[i].y;
|
||||
rect.w = BUTTON_SIZE;
|
||||
rect.h = BUTTON_SIZE;
|
||||
if (SDL_PointInRect(&point, &rect)) {
|
||||
if (SDL_IsPointInRect(&point, &rect)) {
|
||||
return (SDL_GamepadButton)i;
|
||||
}
|
||||
}
|
||||
@@ -466,7 +466,7 @@ static SDL_GamepadAxis FindAxisAtPosition(int x, int y)
|
||||
rect.y = axis_positions[i].y;
|
||||
rect.w = AXIS_SIZE;
|
||||
rect.h = AXIS_SIZE;
|
||||
if (SDL_PointInRect(&point, &rect)) {
|
||||
if (SDL_IsPointInRect(&point, &rect)) {
|
||||
return (SDL_GamepadAxis)i;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ hitTest(SDL_Window *window, const SDL_Point *pt, void *data)
|
||||
int w, h;
|
||||
|
||||
for (i = 0; i < numareas; i++) {
|
||||
if (SDL_PointInRect(pt, &areas[i])) {
|
||||
if (SDL_IsPointInRect(pt, &areas[i])) {
|
||||
SDL_Log("HIT-TEST: DRAGGABLE\n");
|
||||
return SDL_HITTEST_DRAGGABLE;
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ DrawRectLineIntersections(SDL_Renderer *renderer)
|
||||
x2 = lines[j].w;
|
||||
y2 = lines[j].h;
|
||||
|
||||
if (SDL_IntersectRectAndLine(&r, &x1, &y1, &x2, &y2)) {
|
||||
if (SDL_GetRectAndLineIntersection(&r, &x1, &y1, &x2, &y2)) {
|
||||
SDL_RenderLine(renderer, x1, y1, x2, y2);
|
||||
}
|
||||
}
|
||||
@@ -201,7 +201,7 @@ DrawRectRectIntersections(SDL_Renderer *renderer)
|
||||
for (i = 0; i < num_rects; i++) {
|
||||
for (j = i + 1; j < num_rects; j++) {
|
||||
SDL_Rect r;
|
||||
if (SDL_IntersectRect(&rects[i], &rects[j], &r)) {
|
||||
if (SDL_GetRectIntersection(&rects[i], &rects[j], &r)) {
|
||||
SDL_RenderFillRect(renderer, &r);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ draw_modes_menu(SDL_Window *window, SDL_Renderer *renderer, SDL_Rect viewport)
|
||||
cell_rect.w = text_length * FONT_CHARACTER_SIZE;
|
||||
cell_rect.h = lineHeight;
|
||||
|
||||
if (SDL_PointInRect(&mouse_pos, &cell_rect)) {
|
||||
if (SDL_IsPointInRect(&mouse_pos, &cell_rect)) {
|
||||
SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
|
||||
|
||||
/* Update cached mode under the mouse */
|
||||
|
||||
Reference in New Issue
Block a user