(iOS) Fix some warnings in apple_gamecontroller.m

This commit is contained in:
twinaphex 2014-04-14 20:50:10 +02:00
parent 9b69deaa12
commit fb579c24be
2 changed files with 4 additions and 4 deletions

View File

@ -366,7 +366,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = ../; HEADER_SEARCH_PATHS = ../;
IPHONEOS_DEPLOYMENT_TARGET = 6.0; IPHONEOS_DEPLOYMENT_TARGET = 5.1;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = ( OTHER_CFLAGS = (
"-DHAVE_CAMERA", "-DHAVE_CAMERA",
@ -416,7 +416,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = ../; HEADER_SEARCH_PATHS = ../;
IPHONEOS_DEPLOYMENT_TARGET = 6.0; IPHONEOS_DEPLOYMENT_TARGET = 5.1;
OTHER_CFLAGS = ( OTHER_CFLAGS = (
"-DNS_BLOCK_ASSERTIONS=1", "-DNS_BLOCK_ASSERTIONS=1",
"-DNDEBUG", "-DNDEBUG",

View File

@ -35,7 +35,7 @@ static void apple_gamecontroller_poll(GCController* controller)
if (!controller || controller.playerIndex == MAX_PLAYERS) if (!controller || controller.playerIndex == MAX_PLAYERS)
return; return;
uint32_t slot = controller.playerIndex; uint32_t slot = (uint32_t)controller.playerIndex;
g_current_input_data.pad_buttons[slot] = 0; g_current_input_data.pad_buttons[slot] = 0;
memset(g_current_input_data.pad_axis[slot], 0, sizeof(g_current_input_data.pad_axis[0])); memset(g_current_input_data.pad_axis[slot], 0, sizeof(g_current_input_data.pad_axis[0]));
@ -118,7 +118,7 @@ void apple_gamecontroller_disconnect(GCController* controller)
if (controller.playerIndex == GCControllerPlayerIndexUnset) if (controller.playerIndex == GCControllerPlayerIndexUnset)
return; return;
apple_joypad_disconnect(controller.playerIndex); apple_joypad_disconnect((uint32_t)(controller.playerIndex));
} }
void apple_gamecontroller_init(void) void apple_gamecontroller_init(void)