summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/utility-rawinput.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/utility-rawinput.hpp b/common/utility-rawinput.hpp
index f20d594..80d305b 100644
--- a/common/utility-rawinput.hpp
+++ b/common/utility-rawinput.hpp
@@ -18,9 +18,9 @@ void rawinput_foreach_dev_with_id(Func fn, bool with_instance_id = false,
{
const UINT RI_ERROR = -1;
+ // get number of devices
UINT num_devs = 0;
-
- if (GetRawInputDeviceList(NULL, &num_devs, sizeof(RAWINPUTDEVICELIST)) == RI_ERROR) {
+ if (GetRawInputDeviceList(NULL, &num_devs, sizeof(RAWINPUTDEVICELIST)) != 0) {
throw std::system_error(GetLastError(), std::system_category(), "GetRawInputDeviceList failed");
}