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)
X11_MouseData *data;
mouse = SDL_GetMouse(i);
data = (X11_MouseData *)mouse->driverdata;
data = (X11_MouseData *) mouse->driverdata;
if (!data) {
continue;
}
if (xevent.type == data->motion) { /* MotionNotify */
XDeviceMotionEvent *move = (XDeviceMotionEvent *) & xevent;
XDeviceMotionEvent *move =
(XDeviceMotionEvent *) & xevent;
#ifdef DEBUG_MOTION
printf("X11 motion: %d,%d\n", move->x, move->y);
#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;
}
if (xevent.type == data->button_pressed) { /* ButtonPress */
XDeviceButtonPressedEvent *pressed =
(XDeviceButtonPressedEvent *) & xevent;
SDL_SendMouseButton(pressed->deviceid, SDL_PRESSED, pressed->button);
SDL_SendMouseButton(pressed->deviceid, SDL_PRESSED,
pressed->button);
return;
}
if (xevent.type == data->button_released) { /* ButtonRelease */
XDeviceButtonReleasedEvent *released =
(XDeviceButtonReleasedEvent *) & xevent;
SDL_SendMouseButton(released->deviceid, SDL_RELEASED, released->button);
SDL_SendMouseButton(released->deviceid, SDL_RELEASED,
released->button);
return;
}
if (xevent.type == data->proximity_in) {
XProximityNotifyEvent *proximity =
(XProximityNotifyEvent *) & xevent;
SDL_SendProximity(proximity->deviceid, proximity->x, proximity->y, SDL_PROXIMITYIN);
SDL_SendProximity(proximity->deviceid, proximity->x,
proximity->y, SDL_PROXIMITYIN);
return;
}
if (xevent.type == data->proximity_out) {
XProximityNotifyEvent *proximity =
(XProximityNotifyEvent *) & xevent;
SDL_SendProximity(proximity->deviceid, proximity->x, proximity->y, SDL_PROXIMITYOUT);
SDL_SendProximity(proximity->deviceid, proximity->x,
proximity->y, SDL_PROXIMITYOUT);
return;
}
}
......
......@@ -26,9 +26,9 @@
#if SDL_VIDEO_DRIVER_X11_XINPUT
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) {
XCloseDevice(data->display, mouse->id);
......@@ -73,7 +73,7 @@ X11_InitMouse(_THIS)
if (deviceClass->class == ValuatorClass) { /* bingo ;) */
XValuatorInfo *valInfo;
data = (X11_MouseData *)SDL_calloc(1, sizeof(*data));
data = (X11_MouseData *) SDL_calloc(1, sizeof(*data));
if (!data) {
continue;
}
......
......@@ -534,7 +534,7 @@ X11_CreateWindow(_THIS, SDL_Window * window)
X11_MouseData *data;
mouse = SDL_GetMouse(i);
data = (X11_MouseData *)mouse->driverdata;
data = (X11_MouseData *) mouse->driverdata;
if (!data) {
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