Changeset View
Changeset View
Standalone View
Standalone View
kcms/hardware/joystick/joydevice.cpp
Show First 20 Lines • Show All 178 Lines • ▼ Show 20 Line(s) | 134 | { | |||
---|---|---|---|---|---|
179 | 179 | | |||
180 | if ( ::ioctl(fd, JSIOCGCORR, oldCorr) == -1 ) | 180 | if ( ::ioctl(fd, JSIOCGCORR, oldCorr) == -1 ) | ||
181 | { | 181 | { | ||
182 | ::close(fd); | 182 | ::close(fd); | ||
183 | delete [] oldCorr; | 183 | delete [] oldCorr; | ||
184 | return JoyDevice::ERR_GET_CORR; | 184 | return JoyDevice::ERR_GET_CORR; | ||
185 | } | 185 | } | ||
186 | 186 | | |||
187 | if (bt < 0) { | ||||
188 | return JoyDevice::ERR_GET_BUTTONS; | ||||
189 | } | ||||
190 | | ||||
187 | descr = name; | 191 | descr = name; | ||
188 | joyFd = fd; | 192 | joyFd = fd; | ||
189 | axes = ax; | 193 | axes = ax; | ||
190 | buttons = bt; | 194 | buttons = bt; | ||
191 | origCorr = oldCorr; | 195 | origCorr = oldCorr; | ||
192 | corr = new struct js_corr[axes]; | 196 | corr = new struct js_corr[axes]; | ||
193 | 197 | | |||
194 | amin = new int[axes]; | 198 | amin = new int[axes]; | ||
▲ Show 20 Lines • Show All 209 Lines • Show Last 20 Lines |