diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-01-25 23:30:16 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-01-25 23:30:16 +0100 |
commit | 5194e9456674d4058a1e80ee2650e0804fe4a56a (patch) | |
tree | d69a36402d11c335cbff2bf5631ea602c676f7de /dinput | |
parent | e0f0353dd5314d7836a7d3030e4895865f2e62ff (diff) |
dinput: don't zero-initialize when not necessary
Diffstat (limited to 'dinput')
-rw-r--r-- | dinput/win32-joystick.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dinput/win32-joystick.cpp b/dinput/win32-joystick.cpp index 5a372710..90350651 100644 --- a/dinput/win32-joystick.cpp +++ b/dinput/win32-joystick.cpp @@ -48,7 +48,7 @@ bool win32_joy_ctx::poll_axis(const QString &guid, int* axes) auto& j = iter->second; auto& joy_handle = j->joy_handle; - DIJOYSTATE2 js = {}; + DIJOYSTATE2 js; if (!di_t::poll_device(joy_handle)) continue; @@ -142,7 +142,7 @@ bool win32_joy_ctx::joy::poll(fn const& f) return false; } - DIDEVICEOBJECTDATA keystate_buffers[num_buffers] = {}; + DIDEVICEOBJECTDATA keystate_buffers[num_buffers]; DWORD sz = num_buffers; if (FAILED(hr = joy_handle->GetDeviceData(sizeof(DIDEVICEOBJECTDATA), keystate_buffers, &sz, 0))) |