diff --git a/doomsday/api/api_event.h b/doomsday/api/api_event.h index 3c6504b702..c96bde07df 100644 --- a/doomsday/api/api_event.h +++ b/doomsday/api/api_event.h @@ -73,7 +73,6 @@ DENG_API_TYPEDEF(B) int (*BindingsForCommand)(const char* cmd, char* buf, size_t bufSize); int (*BindingsForControl)(int localPlayer, const char* controlName, int inverse, char* buf, size_t bufSize); - void (*ClearKeyRepeaters)(void); int (*GetKeyCode)(const char* name); } DENG_API_T(B); @@ -82,7 +81,6 @@ DENG_API_T(B); #define B_SetContextFallback _api_B.SetContextFallback #define B_BindingsForCommand _api_B.BindingsForCommand #define B_BindingsForControl _api_B.BindingsForControl -#define DD_ClearKeyRepeaters _api_B.ClearKeyRepeaters #define DD_GetKeyCode _api_B.GetKeyCode #endif diff --git a/doomsday/api/apis.h b/doomsday/api/apis.h index a2f981f93f..b4ee575d50 100644 --- a/doomsday/api/apis.h +++ b/doomsday/api/apis.h @@ -63,7 +63,8 @@ enum { DE_API_BASE = DE_API_BASE_v2, DE_API_BINDING_v1 = 100, // 1.10 - DE_API_BINDING = DE_API_BINDING_v1, + DE_API_BINDING_v2 = 101, // 1.15 + DE_API_BINDING = DE_API_BINDING_v2, DE_API_BUSY_v1 = 200, // 1.10 DE_API_BUSY_v2 = 201, // 1.13 diff --git a/doomsday/client/include/ui/dd_input.h b/doomsday/client/include/ui/dd_input.h index a8cb302c2c..1771701d25 100644 --- a/doomsday/client/include/ui/dd_input.h +++ b/doomsday/client/include/ui/dd_input.h @@ -191,7 +191,6 @@ typedef struct inputdev_s { } inputdev_t; extern int repWait1, repWait2; -extern int keyRepeatDelay1, keyRepeatDelay2; // milliseconds extern dd_bool shiftDown, altDown; void DD_RegisterInput(void); @@ -207,7 +206,6 @@ void DD_PostEvent(ddevent_t *ev); void DD_ProcessEvents(timespan_t ticLength); void DD_ProcessSharpEvents(timespan_t ticLength); void DD_ClearEvents(void); -void DD_ClearKeyRepeaterForKey(int ddkey, int native); byte DD_ModKey(byte key); bool DD_ConvertEvent(ddevent_t const *ddEvent, event_t *ev); diff --git a/doomsday/client/src/ui/b_context.cpp b/doomsday/client/src/ui/b_context.cpp index 63dc8afe80..88a1f143a7 100644 --- a/doomsday/client/src/ui/b_context.cpp +++ b/doomsday/client/src/ui/b_context.cpp @@ -213,7 +213,6 @@ void B_UpdateDeviceStateAssociations(void) // No longer valid. dev->keys[j].assoc.flags |= IDAF_EXPIRED; dev->keys[j].assoc.flags &= ~IDAF_TRIGGERED; // Not any more. - DD_ClearKeyRepeaterForKey(j, -1); } } @@ -912,15 +911,11 @@ void B_WriteContextToFile(const bcontext_t* bc, FILE* file) // b_main.c DENG_EXTERN_C int DD_GetKeyCode(const char* key); -// dd_input.c -DENG_EXTERN_C void DD_ClearKeyRepeaters(void); - DENG_DECLARE_API(B) = { { DE_API_BINDING }, B_SetContextFallback, B_BindingsForCommand, B_BindingsForControl, - DD_ClearKeyRepeaters, DD_GetKeyCode }; diff --git a/doomsday/client/src/ui/dd_input.cpp b/doomsday/client/src/ui/dd_input.cpp index bf390a8294..3d45dcb205 100644 --- a/doomsday/client/src/ui/dd_input.cpp +++ b/doomsday/client/src/ui/dd_input.cpp @@ -74,8 +74,6 @@ D_CMD(AxisPrintConfig); D_CMD(AxisChangeOption); D_CMD(AxisChangeValue); #endif -D_CMD(DumpKeyMap); -D_CMD(KeyMap); D_CMD(ListInputDevices); D_CMD(ReleaseMouse); @@ -83,7 +81,6 @@ static void postEventsFromInputDevices(void); // The initial and secondary repeater delays (tics). int repWait1 = 15, repWait2 = 3; -//int keyRepeatDelay1 = 430, keyRepeatDelay2 = 85; // milliseconds unsigned int mouseFreq = 0; dd_bool shiftDown = false, altDown = false; @@ -112,8 +109,6 @@ static char defaultShiftTable[96] = // Contains characters 32 to 127. /* 120 */ 'X', 'Y', 'Z', 0, 0, 0, 0, 0 }; -//static repeater_t keyReps[MAX_DOWNKEYS]; - static float oldPOV = IJOY_POV_CENTER; static char* eventStrings[MAXEVENTS]; @@ -132,8 +127,6 @@ static byte devRendJoyState = false; ///< cvar void DD_RegisterInput(void) { // Cvars - //C_VAR_INT("input-key-delay1", &keyRepeatDelay1, CVF_NO_MAX, 50, 0); - //C_VAR_INT("input-key-delay2", &keyRepeatDelay2, CVF_NO_MAX, 20, 0); C_VAR_BYTE("input-sharp", &useSharpInputEvents, 0, 0, 1); #if _DEBUG @@ -143,10 +136,6 @@ void DD_RegisterInput(void) #endif // Ccmds -#if 0 - C_CMD("dumpkeymap", "s", DumpKeyMap); - C_CMD("keymap", "s", KeyMap); -#endif C_CMD("listinputdevices", "", ListInputDevices); C_CMD("releasemouse", "", ReleaseMouse); @@ -404,7 +393,6 @@ void I_DeviceReset(uint ident) if(ident == IDEV_KEYBOARD) { altDown = shiftDown = false; - DD_ClearKeyRepeaters(); } } @@ -895,7 +883,6 @@ dd_bool DD_IgnoreInput(dd_bool ignore) // Clear all the event buffers. postEventsFromInputDevices(); DD_ClearEvents(); - DD_ClearKeyRepeaters(); } return old; } @@ -1238,42 +1225,6 @@ byte DD_ModKey(byte key) return key; } -/** - * Clears the repeaters array. - */ -#undef DD_ClearKeyRepeaters -DENG_EXTERN_C void DD_ClearKeyRepeaters(void) -{ - //memset(keyReps, 0, sizeof(keyReps)); -} - -void DD_ClearKeyRepeaterForKey(int ddkey, int native) -{ - /* - int k; - - // Clear any repeaters with this key. - for(k = 0; k < MAX_DOWNKEYS; ++k) - { - // Check the native code first, if provided. - if(native >= 0) - { - if(native != keyReps[k].native) - continue; - } - else - { - if(keyReps[k].key != ddkey) continue; - } - - // Clear this. - keyReps[k].native = -1; - keyReps[k].key = 0; - memset(keyReps[k].text, 0, sizeof(keyReps[k].text)); - } - */ -} - /** * Checks the current keyboard state, generates input events * based on pressed/held keys and posts them. @@ -1323,28 +1274,6 @@ void DD_ReadKeyboard(void) LOG_INPUT_XVERBOSE("toggle.id: %i/%c [%s:%u]") << ev.toggle.id << ev.toggle.id << ev.toggle.text << strlen(ev.toggle.text); -#if 0 - // Maintain the repeater table. - if(ev.toggle.state == ETOG_DOWN) - { - // Find an empty repeater. - for(k = 0; k < MAX_DOWNKEYS; ++k) - if(!keyReps[k].key) - { - keyReps[k].key = ev.toggle.id; - keyReps[k].native = ke->native; - memcpy(keyReps[k].text, ev.toggle.text, sizeof(ev.toggle.text)); - keyReps[k].timer = sysTime; - keyReps[k].count = 0; - break; - } - } - else if(ev.toggle.state == ETOG_UP) - { - DD_ClearKeyRepeaterForKey(ev.toggle.id, ke->native); - } -#endif - // Post the event. DD_PostEvent(&ev); }