summaryrefslogtreecommitdiffhomepage
path: root/dinput/win32-joystick.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-04-02 11:20:54 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-04-05 00:16:14 +0200
commit43f082e9de6cacab40b7df63ca4ea40a63a8440d (patch)
tree9aa7b320a3e8a3b5cff6cc0a94aa92d426a66941 /dinput/win32-joystick.hpp
parent93bb0f6acb6c99fe5748f118daccfa75dbcde0c3 (diff)
dinput: try fix cpu usage
I forgot who reported this, sorry.
Diffstat (limited to 'dinput/win32-joystick.hpp')
-rw-r--r--dinput/win32-joystick.hpp3
1 files changed, 2 insertions, 1 deletions
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();