diff options
Diffstat (limited to 'dinput')
| -rw-r--r-- | dinput/keybinding-worker.cpp | 2 | ||||
| -rw-r--r-- | dinput/keybinding-worker.hpp | 2 | ||||
| -rw-r--r-- | dinput/win32-joystick.cpp | 3 | ||||
| -rw-r--r-- | dinput/win32-joystick.hpp | 3 | 
4 files changed, 5 insertions, 5 deletions
| diff --git a/dinput/keybinding-worker.cpp b/dinput/keybinding-worker.cpp index 30d21534..adcd9a96 100644 --- a/dinput/keybinding-worker.cpp +++ b/dinput/keybinding-worker.cpp @@ -194,7 +194,7 @@ void KeybindingWorker::run()              }          } -        Sleep(100); +        Sleep(25);      }  } diff --git a/dinput/keybinding-worker.hpp b/dinput/keybinding-worker.hpp index 407b0107..2596bda0 100644 --- a/dinput/keybinding-worker.hpp +++ b/dinput/keybinding-worker.hpp @@ -61,7 +61,7 @@ private:      void remove_receiver(fun* pos);      ~KeybindingWorker(); -    static constexpr int num_keyboard_states = 128; +    static constexpr int num_keyboard_states = 16;      DIDEVICEOBJECTDATA keyboard_states[num_keyboard_states];      KeybindingWorker(const KeybindingWorker&) = delete; diff --git a/dinput/win32-joystick.cpp b/dinput/win32-joystick.cpp index 9127b6a8..c20aefce 100644 --- a/dinput/win32-joystick.cpp +++ b/dinput/win32-joystick.cpp @@ -12,8 +12,7 @@  #include <QDebug>  // XXX how many axis update events can we reasonably get in a short time frame? -enum { num_buffers = 256 }; -DIDEVICEOBJECTDATA win32_joy_ctx::joy::keystate_buffers[num_buffers]; +DIDEVICEOBJECTDATA win32_joy_ctx::joy::keystate_buffers[win32_joy_ctx::joy::num_buffers];  QMutex win32_joy_ctx::enum_state::mtx;  win32_joy_ctx::enum_state win32_joy_ctx::enumerator; diff --git a/dinput/win32-joystick.hpp b/dinput/win32-joystick.hpp index 42ecf57f..f7ea1302 100644 --- a/dinput/win32-joystick.hpp +++ b/dinput/win32-joystick.hpp @@ -47,7 +47,8 @@ struct OTR_DINPUT_EXPORT win32_joy_ctx          //bool pressed[num_pressed_keys] {};          Timer first_timer; -        static DIDEVICEOBJECTDATA keystate_buffers[256]; +        static constexpr int num_buffers = 16; +        static DIDEVICEOBJECTDATA keystate_buffers[num_buffers];          joy(LPDIRECTINPUTDEVICE8 handle, const QString& guid, const QString& name);          ~joy(); | 
