Platform affix cleanup

Fixes #659.
This commit is contained in:
Camilla Berglund
2015-12-14 03:10:17 +01:00
parent 37c93ba031
commit f079d0625d
3 changed files with 22 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
//========================================================================
// GLFW 3.2 WinMM - www.glfw.org
// GLFW 3.2 Win32 - www.glfw.org
//------------------------------------------------------------------------
// Copyright (c) 2002-2006 Marcus Geelnard
// Copyright (c) 2006-2010 Camilla Berglund <elmindreda@elmindreda.org>
@@ -63,7 +63,7 @@ void _glfwTerminateJoysticksWin32(void)
int i;
for (i = 0; i < GLFW_JOYSTICK_LAST; i++)
free(_glfw.winmm_js[i].name);
free(_glfw.win32_js[i].name);
}
@@ -85,7 +85,7 @@ const float* _glfwPlatformGetJoystickAxes(int joy, int* count)
{
JOYCAPS jc;
JOYINFOEX ji;
float* axes = _glfw.winmm_js[joy].axes;
float* axes = _glfw.win32_js[joy].axes;
if (_glfw_joyGetDevCaps(joy, &jc, sizeof(JOYCAPS)) != JOYERR_NOERROR)
return NULL;
@@ -118,7 +118,7 @@ const unsigned char* _glfwPlatformGetJoystickButtons(int joy, int* count)
{
JOYCAPS jc;
JOYINFOEX ji;
unsigned char* buttons = _glfw.winmm_js[joy].buttons;
unsigned char* buttons = _glfw.win32_js[joy].buttons;
if (_glfw_joyGetDevCaps(joy, &jc, sizeof(JOYCAPS)) != JOYERR_NOERROR)
return NULL;
@@ -169,9 +169,9 @@ const char* _glfwPlatformGetJoystickName(int joy)
if (_glfw_joyGetDevCaps(joy, &jc, sizeof(JOYCAPS)) != JOYERR_NOERROR)
return NULL;
free(_glfw.winmm_js[joy].name);
_glfw.winmm_js[joy].name = _glfwCreateUTF8FromWideStringWin32(jc.szPname);
free(_glfw.win32_js[joy].name);
_glfw.win32_js[joy].name = _glfwCreateUTF8FromWideStringWin32(jc.szPname);
return _glfw.winmm_js[joy].name;
return _glfw.win32_js[joy].name;
}