hidapi/SDL_hidapijoystick.c: fix build in C90 mode:

src/joystick/hidapi/SDL_hidapijoystick.c: In function 'HIDAPI_InitializeDiscovery':
src/joystick/hidapi/SDL_hidapijoystick.c:281: error: 'true' undeclared (first use in this function)
src/joystick/hidapi/SDL_hidapijoystick.c:281: error: (Each undeclared identifier is reported only once
src/joystick/hidapi/SDL_hidapijoystick.c:281: error: for each function it appears in.)
src/joystick/hidapi/SDL_hidapijoystick.c: In function 'HIDAPI_UpdateDiscovery':
src/joystick/hidapi/SDL_hidapijoystick.c:339: error: 'true' undeclared (first use in this function)
src/joystick/hidapi/SDL_hidapijoystick.c:341: error: ISO C90 forbids mixed declarations and code
This commit is contained in:
Ozkan Sezer 2018-09-07 11:03:24 +03:00
parent afc1738ecb
commit 33381d3d10
1 changed files with 4 additions and 3 deletions

View File

@ -278,7 +278,7 @@ HIDAPI_InitializeDiscovery()
if (SDL_HIDAPI_discovery.m_pUdevMonitor) {
udev_monitor_enable_receiving(SDL_HIDAPI_discovery.m_pUdevMonitor);
SDL_HIDAPI_discovery.m_nUdevFd = udev_monitor_get_fd(SDL_HIDAPI_discovery.m_pUdevMonitor);
SDL_HIDAPI_discovery.m_bCanGetNotifications = true;
SDL_HIDAPI_discovery.m_bCanGetNotifications = SDL_TRUE;
}
}
@ -329,6 +329,7 @@ HIDAPI_UpdateDiscovery()
*/
for (;;) {
struct pollfd PollUdev;
struct udev_device *pUdevDevice;
PollUdev.fd = SDL_HIDAPI_discovery.m_nUdevFd;
PollUdev.events = POLLIN;
@ -336,9 +337,9 @@ HIDAPI_UpdateDiscovery()
break;
}
SDL_HIDAPI_discovery.m_bHaveDevicesChanged = true;
SDL_HIDAPI_discovery.m_bHaveDevicesChanged = SDL_TRUE;
struct udev_device *pUdevDevice = udev_monitor_receive_device(SDL_HIDAPI_discovery.m_pUdevMonitor);
pUdevDevice = udev_monitor_receive_device(SDL_HIDAPI_discovery.m_pUdevMonitor);
if (pUdevDevice) {
udev_device_unref(pUdevDevice);
}