mirror of
https://github.com/glfw/glfw.git
synced 2025-10-05 06:06:36 +00:00
Fixing Xcode Warnings
This commit is contained in:
parent
e88a9e6e22
commit
e1a8891139
@ -247,9 +247,9 @@ static void matchCallback(void* context,
|
||||
compareElements, NULL);
|
||||
|
||||
js = _glfwAllocJoystick(name, guid,
|
||||
CFArrayGetCount(axes),
|
||||
CFArrayGetCount(buttons),
|
||||
CFArrayGetCount(hats));
|
||||
(int) CFArrayGetCount(axes),
|
||||
(int) CFArrayGetCount(buttons),
|
||||
(int) CFArrayGetCount(hats));
|
||||
|
||||
js->ns.device = device;
|
||||
js->ns.axes = axes;
|
||||
@ -399,11 +399,13 @@ int _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode)
|
||||
|
||||
const long delta = axis->maximum - axis->minimum;
|
||||
if (delta == 0)
|
||||
_glfwInputJoystickAxis(js, i, 0.f);
|
||||
{
|
||||
_glfwInputJoystickAxis(js, (int) i, 0.f);
|
||||
}
|
||||
else
|
||||
{
|
||||
const float value = (2.f * (raw - axis->minimum) / delta) - 1.f;
|
||||
_glfwInputJoystickAxis(js, i, value);
|
||||
_glfwInputJoystickAxis(js, (int) i, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -417,7 +419,7 @@ int _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode)
|
||||
_GLFWjoyelementNS* button = (_GLFWjoyelementNS*)
|
||||
CFArrayGetValueAtIndex(js->ns.buttons, i);
|
||||
const char value = getElementValue(js, button) - button->minimum;
|
||||
_glfwInputJoystickButton(js, i, value);
|
||||
_glfwInputJoystickButton(js, (int) i, value);
|
||||
}
|
||||
|
||||
for (i = 0; i < CFArrayGetCount(js->ns.hats); i++)
|
||||
@ -441,7 +443,7 @@ int _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode)
|
||||
if (state < 0 || state > 8)
|
||||
state = 8;
|
||||
|
||||
_glfwInputJoystickHat(js, i, states[state]);
|
||||
_glfwInputJoystickHat(js, (int) i, states[state]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -686,7 +686,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
||||
[sender draggingLocation].x,
|
||||
contentRect.size.height - [sender draggingLocation].y);
|
||||
|
||||
const int count = [files count];
|
||||
const int count = (int) [files count];
|
||||
if (count)
|
||||
{
|
||||
NSEnumerator* e = [files objectEnumerator];
|
||||
|
@ -136,8 +136,8 @@ static GLFWbool parseMapping(_GLFWmapping* mapping, const char* string)
|
||||
|
||||
if (fields[i].element->type == _GLFW_JOYSTICK_HATBIT)
|
||||
{
|
||||
const unsigned int hat = strtoul(c + 1, (char**) &c, 10);
|
||||
const unsigned int bit = strtoul(c + 1, (char**) &c, 10);
|
||||
const unsigned int hat = (unsigned int) strtoul(c + 1, (char**) &c, 10);
|
||||
const unsigned int bit = (unsigned int) strtoul(c + 1, (char**) &c, 10);
|
||||
fields[i].element->value = (hat << 4) | bit;
|
||||
}
|
||||
else
|
||||
|
@ -37,7 +37,7 @@
|
||||
#define OSMESA_CONTEXT_MINOR_VERSION 0x37
|
||||
|
||||
typedef void* OSMesaContext;
|
||||
typedef void (*OSMESAproc)();
|
||||
typedef void (*OSMESAproc)(void);
|
||||
|
||||
typedef OSMesaContext (GLAPIENTRY * PFN_OSMesaCreateContextExt)(GLenum,GLint,GLint,GLint,OSMesaContext);
|
||||
typedef OSMesaContext (GLAPIENTRY * PFN_OSMesaCreateContextAttribs)(const int*,OSMesaContext);
|
||||
|
Loading…
Reference in New Issue
Block a user