Properly save and clear the pointer to the internal mode key state data

when the keyboard is initialized, enabled, and disabled. (Takuma
    Murakami)
This commit is contained in:
Alexander Gottwald 2003-12-18 20:17:58 +00:00
parent 327a13a570
commit dee29000a6

View file

@ -339,7 +339,7 @@ winKeybdBell (int iPercent, DeviceIntPtr pDeviceInt,
void
winKeybdCtrl (DeviceIntPtr pDevice, KeybdCtrl *pCtrl)
{
g_winInternalModeKeyStatesPtr = &(pDevice->key->state);
}
@ -445,11 +445,13 @@ winKeybdProc (DeviceIntPtr pDeviceInt, int iState)
case DEVICE_ON:
pDevice->on = TRUE;
g_winInternalModeKeyStatesPtr = &(pDeviceInt->key->state);
break;
case DEVICE_CLOSE:
case DEVICE_OFF:
pDevice->on = FALSE;
g_winInternalModeKeyStatesPtr = NULL;
break;
}