mGUI: Fix warnings on 64-bit

This commit is contained in:
Vicki Pfau 2018-09-20 11:24:33 -07:00
parent 9fb7485051
commit 51f9a76ab2

View File

@ -69,13 +69,13 @@ void mGUIRemapKeys(struct GUIParams* params, struct mInputMap* map, const struct
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;