mirror of https://github.com/encounter/SDL.git
Fixed whitespace
This commit is contained in:
parent
fda14741ac
commit
16ccff3c56
|
@ -850,7 +850,7 @@ static SDL_bool
|
||||||
HIDAPI_DriverSwitch_Update(SDL_Joystick *joystick, hid_device *dev, void *context)
|
HIDAPI_DriverSwitch_Update(SDL_Joystick *joystick, hid_device *dev, void *context)
|
||||||
{
|
{
|
||||||
SDL_DriverSwitch_Context *ctx = (SDL_DriverSwitch_Context *)context;
|
SDL_DriverSwitch_Context *ctx = (SDL_DriverSwitch_Context *)context;
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
while ((size = ReadInput(ctx)) > 0) {
|
while ((size = ReadInput(ctx)) > 0) {
|
||||||
switch (ctx->m_rgucReadBuffer[0]) {
|
switch (ctx->m_rgucReadBuffer[0]) {
|
||||||
|
@ -872,7 +872,7 @@ HIDAPI_DriverSwitch_Update(SDL_Joystick *joystick, hid_device *dev, void *contex
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (size >= 0);
|
return (size >= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -296,7 +296,7 @@ HIDAPI_DriverXboxOne_Update(SDL_Joystick *joystick, hid_device *dev, void *conte
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (size >= 0);
|
return (size >= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -64,7 +64,7 @@ typedef struct _SDL_HIDAPI_Device
|
||||||
char *path;
|
char *path;
|
||||||
Uint16 vendor_id;
|
Uint16 vendor_id;
|
||||||
Uint16 product_id;
|
Uint16 product_id;
|
||||||
Uint16 version;
|
Uint16 version;
|
||||||
SDL_JoystickGUID guid;
|
SDL_JoystickGUID guid;
|
||||||
int interface_number; /* Available on Windows and Linux */
|
int interface_number; /* Available on Windows and Linux */
|
||||||
Uint16 usage_page; /* Available on Windows and Mac OS X */
|
Uint16 usage_page; /* Available on Windows and Mac OS X */
|
||||||
|
@ -143,7 +143,7 @@ typedef struct _DEV_BROADCAST_DEVICEINTERFACE_A
|
||||||
|
|
||||||
typedef struct _DEV_BROADCAST_HDR DEV_BROADCAST_HDR;
|
typedef struct _DEV_BROADCAST_HDR DEV_BROADCAST_HDR;
|
||||||
#define DBT_DEVICEARRIVAL 0x8000 /* system detected a new device */
|
#define DBT_DEVICEARRIVAL 0x8000 /* system detected a new device */
|
||||||
#define DBT_DEVICEREMOVECOMPLETE 0x8004 /* device was removed from the system */
|
#define DBT_DEVICEREMOVECOMPLETE 0x8004 /* device was removed from the system */
|
||||||
#define DBT_DEVTYP_DEVICEINTERFACE 0x00000005 /* device interface class */
|
#define DBT_DEVTYP_DEVICEINTERFACE 0x00000005 /* device interface class */
|
||||||
#define DBT_DEVNODES_CHANGED 0x0007
|
#define DBT_DEVNODES_CHANGED 0x0007
|
||||||
#define DBT_CONFIGCHANGED 0x0018
|
#define DBT_CONFIGCHANGED 0x0018
|
||||||
|
@ -159,7 +159,7 @@ static LRESULT CALLBACK ControllerWndProc(HWND hwnd, UINT message, WPARAM wParam
|
||||||
case WM_DEVICECHANGE:
|
case WM_DEVICECHANGE:
|
||||||
switch (wParam) {
|
switch (wParam) {
|
||||||
case DBT_DEVICEARRIVAL:
|
case DBT_DEVICEARRIVAL:
|
||||||
case DBT_DEVICEREMOVECOMPLETE:
|
case DBT_DEVICEREMOVECOMPLETE:
|
||||||
if (((DEV_BROADCAST_HDR*)lParam)->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE) {
|
if (((DEV_BROADCAST_HDR*)lParam)->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE) {
|
||||||
SDL_HIDAPI_discovery.m_bHaveDevicesChanged = SDL_TRUE;
|
SDL_HIDAPI_discovery.m_bHaveDevicesChanged = SDL_TRUE;
|
||||||
}
|
}
|
||||||
|
@ -700,7 +700,7 @@ HIDAPI_AddDevice(struct hid_device_info *info)
|
||||||
device->seen = SDL_TRUE;
|
device->seen = SDL_TRUE;
|
||||||
device->vendor_id = info->vendor_id;
|
device->vendor_id = info->vendor_id;
|
||||||
device->product_id = info->product_id;
|
device->product_id = info->product_id;
|
||||||
device->version = info->release_number;
|
device->version = info->release_number;
|
||||||
device->interface_number = info->interface_number;
|
device->interface_number = info->interface_number;
|
||||||
device->usage_page = info->usage_page;
|
device->usage_page = info->usage_page;
|
||||||
device->usage = info->usage;
|
device->usage = info->usage;
|
||||||
|
@ -958,14 +958,14 @@ HIDAPI_JoystickUpdate(SDL_Joystick * joystick)
|
||||||
struct joystick_hwdata *hwdata = joystick->hwdata;
|
struct joystick_hwdata *hwdata = joystick->hwdata;
|
||||||
SDL_HIDAPI_DeviceDriver *driver = hwdata->driver;
|
SDL_HIDAPI_DeviceDriver *driver = hwdata->driver;
|
||||||
if (!driver->Update(joystick, hwdata->dev, hwdata->context)) {
|
if (!driver->Update(joystick, hwdata->dev, hwdata->context)) {
|
||||||
SDL_HIDAPI_Device *device;
|
SDL_HIDAPI_Device *device;
|
||||||
for (device = SDL_HIDAPI_devices; device; device = device->next) {
|
for (device = SDL_HIDAPI_devices; device; device = device->next) {
|
||||||
if (device->instance_id == joystick->instance_id) {
|
if (device->instance_id == joystick->instance_id) {
|
||||||
HIDAPI_DelDevice(device, SDL_TRUE);
|
HIDAPI_DelDevice(device, SDL_TRUE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue