diff options
author | Hein-Pieter van Braam <hp@tmm.cx> | 2017-09-06 23:50:18 +0200 |
---|---|---|
committer | Hein-Pieter van Braam <hp@tmm.cx> | 2017-09-08 14:59:15 +0200 |
commit | 8230bf0a2f39f0849b670d26067207c45edcca1a (patch) | |
tree | 42f598d11fab7f1449d0cace0f991f546bd72e72 /platform/windows/joypad.cpp | |
parent | d1cb73b47a17de830d9474026ffa7b3587cfbc68 (diff) | |
download | redot-engine-8230bf0a2f39f0849b670d26067207c45edcca1a.tar.gz |
Remove assignment and declarations in if statements
After discussing with @reduz and @akien-mga it was decided that we do
not allow assignments or declarations in if statements. This PR removes
the instances of this I could find by automated means.
Diffstat (limited to 'platform/windows/joypad.cpp')
-rw-r--r-- | platform/windows/joypad.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/windows/joypad.cpp b/platform/windows/joypad.cpp index 00cfa812de..0c7358f499 100644 --- a/platform/windows/joypad.cpp +++ b/platform/windows/joypad.cpp @@ -379,7 +379,9 @@ void JoypadWindows::process_joypads() { IDirectInputDevice8_Acquire(joy->di_joy); joy->di_joy->Poll(); } - if (FAILED(hr = joy->di_joy->GetDeviceState(sizeof(DIJOYSTATE2), &js))) { + + hr = joy->di_joy->GetDeviceState(sizeof(DIJOYSTATE2), &js); + if (FAILED(hr)) { //printf("failed to read joy #%d\n", i); continue; |