mirror of
https://github.com/RPCS3/hidapi.git
synced 2026-07-19 13:34:37 -04:00
2dd94af2ea
Older versions of MSVC (for example when using Visual Studio 10) don't
yet support variable declaration in the middle of blocks:
hidapi\windows\hid.c(845) : error C2275: 'BOOL' : illegal use of this type as an expression
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\windef.h(153) : see declaration of 'BOOL'
Move the declaration of res to the beginning of the function. Like in
hid_get_feature_report, only res is moved, essentially ignoring the #if
0 block (or assuming it will never be enabled).