Commit 21915865 authored by Sam Lantinga's avatar Sam Lantinga

indent

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403404
parent 4bc10ea0
...@@ -302,41 +302,47 @@ X11_DispatchEvent(_THIS) ...@@ -302,41 +302,47 @@ X11_DispatchEvent(_THIS)
X11_MouseData *data; X11_MouseData *data;
mouse = SDL_GetMouse(i); mouse = SDL_GetMouse(i);
data = (X11_MouseData *)mouse->driverdata; data = (X11_MouseData *) mouse->driverdata;
if (!data) { if (!data) {
continue; continue;
} }
if (xevent.type == data->motion) { /* MotionNotify */ if (xevent.type == data->motion) { /* MotionNotify */
XDeviceMotionEvent *move = (XDeviceMotionEvent *) & xevent; XDeviceMotionEvent *move =
(XDeviceMotionEvent *) & xevent;
#ifdef DEBUG_MOTION #ifdef DEBUG_MOTION
printf("X11 motion: %d,%d\n", move->x, move->y); printf("X11 motion: %d,%d\n", move->x, move->y);
#endif #endif
SDL_SendMouseMotion(move->deviceid, 0, move->x, move->y, move->axis_data[2]); SDL_SendMouseMotion(move->deviceid, 0, move->x, move->y,
move->axis_data[2]);
return; return;
} }
if (xevent.type == data->button_pressed) { /* ButtonPress */ if (xevent.type == data->button_pressed) { /* ButtonPress */
XDeviceButtonPressedEvent *pressed = XDeviceButtonPressedEvent *pressed =
(XDeviceButtonPressedEvent *) & xevent; (XDeviceButtonPressedEvent *) & xevent;
SDL_SendMouseButton(pressed->deviceid, SDL_PRESSED, pressed->button); SDL_SendMouseButton(pressed->deviceid, SDL_PRESSED,
pressed->button);
return; return;
} }
if (xevent.type == data->button_released) { /* ButtonRelease */ if (xevent.type == data->button_released) { /* ButtonRelease */
XDeviceButtonReleasedEvent *released = XDeviceButtonReleasedEvent *released =
(XDeviceButtonReleasedEvent *) & xevent; (XDeviceButtonReleasedEvent *) & xevent;
SDL_SendMouseButton(released->deviceid, SDL_RELEASED, released->button); SDL_SendMouseButton(released->deviceid, SDL_RELEASED,
released->button);
return; return;
} }
if (xevent.type == data->proximity_in) { if (xevent.type == data->proximity_in) {
XProximityNotifyEvent *proximity = XProximityNotifyEvent *proximity =
(XProximityNotifyEvent *) & xevent; (XProximityNotifyEvent *) & xevent;
SDL_SendProximity(proximity->deviceid, proximity->x, proximity->y, SDL_PROXIMITYIN); SDL_SendProximity(proximity->deviceid, proximity->x,
proximity->y, SDL_PROXIMITYIN);
return; return;
} }
if (xevent.type == data->proximity_out) { if (xevent.type == data->proximity_out) {
XProximityNotifyEvent *proximity = XProximityNotifyEvent *proximity =
(XProximityNotifyEvent *) & xevent; (XProximityNotifyEvent *) & xevent;
SDL_SendProximity(proximity->deviceid, proximity->x, proximity->y, SDL_PROXIMITYOUT); SDL_SendProximity(proximity->deviceid, proximity->x,
proximity->y, SDL_PROXIMITYOUT);
return; return;
} }
} }
......
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
#if SDL_VIDEO_DRIVER_X11_XINPUT #if SDL_VIDEO_DRIVER_X11_XINPUT
static void static void
X11_FreeMouse(SDL_Mouse *mouse) X11_FreeMouse(SDL_Mouse * mouse)
{ {
X11_MouseData *data = (X11_MouseData *)mouse->driverdata; X11_MouseData *data = (X11_MouseData *) mouse->driverdata;
if (data) { if (data) {
XCloseDevice(data->display, mouse->id); XCloseDevice(data->display, mouse->id);
...@@ -73,7 +73,7 @@ X11_InitMouse(_THIS) ...@@ -73,7 +73,7 @@ X11_InitMouse(_THIS)
if (deviceClass->class == ValuatorClass) { /* bingo ;) */ if (deviceClass->class == ValuatorClass) { /* bingo ;) */
XValuatorInfo *valInfo; XValuatorInfo *valInfo;
data = (X11_MouseData *)SDL_calloc(1, sizeof(*data)); data = (X11_MouseData *) SDL_calloc(1, sizeof(*data));
if (!data) { if (!data) {
continue; continue;
} }
......
...@@ -534,7 +534,7 @@ X11_CreateWindow(_THIS, SDL_Window * window) ...@@ -534,7 +534,7 @@ X11_CreateWindow(_THIS, SDL_Window * window)
X11_MouseData *data; X11_MouseData *data;
mouse = SDL_GetMouse(i); mouse = SDL_GetMouse(i);
data = (X11_MouseData *)mouse->driverdata; data = (X11_MouseData *) mouse->driverdata;
if (!data) { if (!data) {
continue; continue;
} }
......
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