Re: [dinput] initial support for BSD's usbhid joysticks
27 Apr
2008
27 Apr
'08
7:14 p.m.
Christoph Frick wrote:
Add dinput support for BSD's usbhid joysticks
+ if (have_joy_devs == 0) { + joy_devs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct JoyDev)); + } else { + HeapReAlloc(GetProcessHeap(), 0, joy_devs, (1 + have_joy_devs) * sizeof(struct JoyDev)); + } + joy_devs[have_joy_devs++] = joydev; + + hid_dispose_report_desc(rdesc); + close(fd); + } +}
This is ugly! Curly brackets should go on the separate line. And I asked no tabs please! And again you copied all the code - I'm against this. All the duplicate code should go into the new joystick base class. No reason to rewrite code if it can be written right the first time around. Vitaliy.
6441
Age (days ago)
6441
Last active (days ago)
0 comments
1 participants
participants (1)
-
Vitaliy Margolen