[client] move remaining code in core.c into the SDL backend

This commit is contained in:
Geoffrey McRae
2021-01-25 20:32:02 +11:00
parent bf583290a4
commit 6b1e310343
8 changed files with 53 additions and 35 deletions

View File

@@ -206,17 +206,3 @@ void util_rotatePoint(struct DoublePoint *point)
break;
}
}
bool util_isValidCursorLocation(int x, int y)
{
const int displays = SDL_GetNumVideoDisplays();
for(int i = 0; i < displays; ++i)
{
SDL_Rect r;
SDL_GetDisplayBounds(i, &r);
if ((x >= r.x && x < r.x + r.w) &&
(y >= r.y && y < r.y + r.h))
return true;
}
return false;
}