Fixed 64-bit conversion warnings

main
Sam Lantinga 2024-03-28 09:12:26 -07:00
parent c8489a3710
commit fc81d4e5fc
1 changed files with 2 additions and 2 deletions

View File

@ -693,11 +693,11 @@ void WIN_PollRawInput(SDL_VideoDevice *_this)
/* Get all available events */
input = (RAWINPUT *)data->rawinput;
for (;;) {
size = data->rawinput_size - ((BYTE *)input - data->rawinput);
size = data->rawinput_size - (UINT)((BYTE *)input - data->rawinput);
count = GetRawInputBuffer(input, &size, sizeof(RAWINPUTHEADER));
if (count == 0 || count == (UINT)-1) {
if (!data->rawinput || (count == (UINT)-1 && GetLastError() == ERROR_INSUFFICIENT_BUFFER)) {
const size_t RAWINPUT_BUFFER_SIZE_INCREMENT = 96; // 2 64-bit raw mouse packets
const UINT RAWINPUT_BUFFER_SIZE_INCREMENT = 96; // 2 64-bit raw mouse packets
BYTE *rawinput = (BYTE *)SDL_realloc(data->rawinput, data->rawinput_size + RAWINPUT_BUFFER_SIZE_INCREMENT);
if (!rawinput) {
break;