mirror of
https://github.com/glfw/glfw.git
synced 2025-10-05 06:06:36 +00:00
Addressing Feedback
This commit is contained in:
parent
e42421315d
commit
50bbd36b4a
@ -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;
|
||||
|
@ -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]);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user