all repos — mgba @ 51f9a76ab212514ba8035a85b60af4b963fabc11

mGBA Game Boy Advance Emulator

mGUI: Fix warnings on 64-bit
Vicki Pfau vi@endrift.com
Thu, 20 Sep 2018 11:24:33 -0700
commit

51f9a76ab212514ba8035a85b60af4b963fabc11

parent

9fb7485051241fa7939a6a88954dedbf69d7616a

1 files changed, 5 insertions(+), 5 deletions(-)

jump to
M src/feature/gui/remap.csrc/feature/gui/remap.c

@@ -69,13 +69,13 @@ }

if (item->data == (void*) (GUI_INPUT_MAX + map->info->nKeys + 2)) { for (i = 0; i < GUIMenuItemListSize(&menu.items); ++i) { item = GUIMenuItemListGetPointer(&menu.items, i); - if ((uint32_t) item->data < 1) { + if ((uintptr_t) item->data < 1) { continue; } - if ((uint32_t) item->data < GUI_INPUT_MAX + 1) { - mInputBindKey(&params->keyMap, keys->id, item->state - 1, (uint32_t) item->data - 1); - } else if ((uint32_t) item->data < GUI_INPUT_MAX + map->info->nKeys + 1) { - mInputBindKey(map, keys->id, item->state - 1, (uint32_t) item->data - GUI_INPUT_MAX - 1); + if ((uintptr_t) item->data < GUI_INPUT_MAX + 1) { + mInputBindKey(&params->keyMap, keys->id, item->state - 1, (uintptr_t) item->data - 1); + } else if ((uintptr_t) item->data < GUI_INPUT_MAX + map->info->nKeys + 1) { + mInputBindKey(map, keys->id, item->state - 1, (uintptr_t) item->data - GUI_INPUT_MAX - 1); } } break;