Addressing Feedback

This commit is contained in:
Stephen Gowen 2017-11-16 16:35:26 -05:00
parent e42421315d
commit 50bbd36b4a
3 changed files with 5 additions and 7 deletions

View File

@ -399,9 +399,7 @@ int _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode)
const long delta = axis->maximum - axis->minimum;
if (delta == 0)
{
_glfwInputJoystickAxis(js, (int) i, 0.f);
}
else
{
const float value = (2.f * (raw - axis->minimum) / delta) - 1.f;

View File

@ -686,17 +686,17 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
[sender draggingLocation].x,
contentRect.size.height - [sender draggingLocation].y);
const int count = (int) [files count];
const NSUInteger count = [files count];
if (count)
{
NSEnumerator* e = [files objectEnumerator];
char** paths = calloc(count, sizeof(char*));
int i;
NSUInteger i;
for (i = 0; i < count; i++)
paths[i] = strdup([[e nextObject] UTF8String]);
_glfwInputDrop(window, count, (const char**) paths);
_glfwInputDrop(window, (int) count, (const char**) paths);
for (i = 0; i < count; i++)
free(paths[i]);

View File

@ -136,8 +136,8 @@ static GLFWbool parseMapping(_GLFWmapping* mapping, const char* string)
if (fields[i].element->type == _GLFW_JOYSTICK_HATBIT)
{
const unsigned int hat = (unsigned int) strtoul(c + 1, (char**) &c, 10);
const unsigned int bit = (unsigned int) strtoul(c + 1, (char**) &c, 10);
const unsigned long hat = strtoul(c + 1, (char**) &c, 10);
const unsigned long bit = strtoul(c + 1, (char**) &c, 10);
fields[i].element->value = (hat << 4) | bit;
}
else