Commit 7e2f26d6 authored by Bruno Jesus's avatar Bruno Jesus Committed by Alexandre Julliard

dinput: Ensure variable is initialized when #define is not found (Cppcheck).

parent e3c44185
......@@ -169,6 +169,9 @@ static INT find_joystick_devices(void)
WARN("ioctl(%s,JSIOCGAXES) failed: %s, defauting to 2\n", joydev.device, strerror(errno));
joydev.axis_count = 2;
}
#else
WARN("reading number of joystick axes unsupported in this platform, defaulting to 2\n");
joydev.axis_count = 2;
#endif
#ifdef JSIOCGBUTTONS
if (ioctl(fd, JSIOCGBUTTONS, &joydev.button_count) < 0)
......@@ -176,6 +179,9 @@ static INT find_joystick_devices(void)
WARN("ioctl(%s,JSIOCGBUTTONS) failed: %s, defauting to 2\n", joydev.device, strerror(errno));
joydev.button_count = 2;
}
#else
WARN("reading number of joystick buttons unsupported in this platform, defaulting to 2\n");
joydev.button_count = 2;
#endif
if (ioctl(fd, JSIOCGAXMAP, axes_map) < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment