diff --git a/Windows/ControlMapping.h b/Windows/ControlMapping.h index 8f53c0dee5..ce495c5899 100644 --- a/Windows/ControlMapping.h +++ b/Windows/ControlMapping.h @@ -19,26 +19,6 @@ #include "InputDevice.h" -struct RawInputState -{ - UINT button; - UINT prevButton; - RawInputState() { - button = 0; - prevButton = 0; - } -}; - -#define POV_CODE_UP 0x0100 -#define POV_CODE_DOWN 0x0200 -#define POV_CODE_LEFT 0x0400 -#define POV_CODE_RIGHT 0x0800 #define XBOX_CODE_LEFTTRIGGER 0x00010000 #define XBOX_CODE_RIGHTTRIGGER 0x00020000 -#define CONTROLS_KEYBOARD_INDEX 0 -#define CONTROLS_DIRECT_INPUT_INDEX 1 -#define CONTROLS_XINPUT_INDEX 2 -#define CONTROLS_KEYBOARD_ANALOG_INDEX 3 -#define CONTROLS_DEVICE_NUM 4 - diff --git a/Windows/DinputDevice.cpp b/Windows/DinputDevice.cpp index d21861f97b..86ebdfff90 100644 --- a/Windows/DinputDevice.cpp +++ b/Windows/DinputDevice.cpp @@ -465,31 +465,3 @@ void DinputDevice::ApplyButtons(DIJOYSTATE2 &state, InputState &input_state) { } } -int DinputDevice::UpdateRawStateSingle(RawInputState &rawState) { - if (g_Config.iForceInputDevice == 0) return FALSE; - if (!pJoystick) return FALSE; - - DIJOYSTATE2 js; - - if (FAILED(pJoystick->Poll())) { - if(pJoystick->Acquire() == DIERR_INPUTLOST) - return FALSE; - } - - if(FAILED(pJoystick->GetDeviceState(sizeof(DIJOYSTATE2), &js))) - return -1; - switch (js.rgdwPOV[0]) { - case JOY_POVFORWARD: rawState.button = POV_CODE_UP; return TRUE; - case JOY_POVBACKWARD: rawState.button = POV_CODE_DOWN; return TRUE; - case JOY_POVLEFT: rawState.button = POV_CODE_LEFT; return TRUE; - case JOY_POVRIGHT: rawState.button = POV_CODE_RIGHT; return TRUE; - } - - for (int i = 0; i < DIRECTINPUT_RGBBUTTONS_MAX; i++) { - if (js.rgbButtons[i] & 0x80) { - rawState.button = i; - return TRUE; - } - } - return FALSE; -} diff --git a/Windows/DinputDevice.h b/Windows/DinputDevice.h index 13fecd8699..a2d9c14e0e 100644 --- a/Windows/DinputDevice.h +++ b/Windows/DinputDevice.h @@ -22,8 +22,6 @@ #include "InputDevice.h" #include "dinput.h" -struct RawInputState; - class DinputDevice : public InputDevice { @@ -32,7 +30,6 @@ public: ~DinputDevice(); virtual int UpdateState(InputState &input_state); virtual bool IsPad() { return true; } - int UpdateRawStateSingle(RawInputState &rawState); private: void ApplyButtons(DIJOYSTATE2 &state, InputState &input_state); LPDIRECTINPUT8 pDI; diff --git a/Windows/XinputDevice.h b/Windows/XinputDevice.h index 9ef1ae0b70..926221cc1c 100644 --- a/Windows/XinputDevice.h +++ b/Windows/XinputDevice.h @@ -2,8 +2,6 @@ #include "InputDevice.h" #include "Xinput.h" -struct RawInputState; - class XinputDevice : public InputDevice {