Renamed control modifier bit to match key token.

This commit is contained in:
Camilla Berglund 2013-05-23 14:11:05 +02:00
parent 47b06e1fdc
commit 3bcffba24a
4 changed files with 6 additions and 6 deletions

View File

@ -415,7 +415,7 @@ extern "C" {
#define GLFW_MOD_SHIFT 0x0001
/*! @ingroup input
*/
#define GLFW_MOD_CTRL 0x0002
#define GLFW_MOD_CONTROL 0x0002
/*! @ingroup input
*/
#define GLFW_MOD_ALT 0x0004

View File

@ -210,7 +210,7 @@ static int convertKeyMods(NSUInteger flags)
if (flags & NSShiftKeyMask)
mods |= GLFW_MOD_SHIFT;
if (flags & NSControlKeyMask)
mods |= GLFW_MOD_CTRL;
mods |= GLFW_MOD_CONTROL;
if (flags & NSAlternateKeyMask)
mods |= GLFW_MOD_ALT;

View File

@ -113,7 +113,7 @@ static int getKeyMods(void)
if (GetKeyState(VK_SHIFT) & (1 << 31))
mods |= GLFW_MOD_SHIFT;
if (GetKeyState(VK_CONTROL) & (1 << 31))
mods |= GLFW_MOD_CTRL;
mods |= GLFW_MOD_CONTROL;
if (GetKeyState(VK_MENU) & (1 << 31))
mods |= GLFW_MOD_ALT;
@ -129,7 +129,7 @@ static int getAsyncKeyMods(void)
if (GetAsyncKeyState(VK_SHIFT) & (1 << 31))
mods |= GLFW_MOD_SHIFT;
if (GetAsyncKeyState(VK_CONTROL) & (1 << 31))
mods |= GLFW_MOD_CTRL;
mods |= GLFW_MOD_CONTROL;
if (GetAsyncKeyState(VK_MENU) & (1 << 31))
mods |= GLFW_MOD_ALT;

View File

@ -67,7 +67,7 @@ int translateState(int state)
if (state & ShiftMask)
mods |= GLFW_MOD_SHIFT;
if (state & ControlMask)
mods |= GLFW_MOD_CTRL;
mods |= GLFW_MOD_CONTROL;
if (state & Mod1Mask)
mods |= GLFW_MOD_ALT;
@ -532,7 +532,7 @@ static void processEvent(XEvent *event)
_glfwInputKey(window, key, GLFW_PRESS, mods);
if (!(mods & GLFW_MOD_CTRL) && !(mods & GLFW_MOD_ALT))
if (!(mods & GLFW_MOD_CONTROL) && !(mods & GLFW_MOD_ALT))
_glfwInputChar(window, translateChar(&event->xkey));
break;