Mercurial > sdl-ios-xcode
diff src/video/ataricommon/SDL_ataridevmouse.c @ 1668:4da1ee79c9af SDL-1.3
more tweaking indent options
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 29 May 2006 04:04:35 +0000 |
parents | 782fd950bd46 |
children |
line wrap: on
line diff
--- a/src/video/ataricommon/SDL_ataridevmouse.c Mon May 29 03:53:21 2006 +0000 +++ b/src/video/ataricommon/SDL_ataridevmouse.c Mon May 29 04:04:35 2006 +0000 @@ -45,7 +45,7 @@ /* Functions */ int -SDL_AtariDevMouse_Open (void) +SDL_AtariDevMouse_Open(void) { int r; const char *mousedev; @@ -57,14 +57,14 @@ return 0; /* First, try SDL_MOUSEDEV device */ - mousedev = SDL_getenv ("SDL_MOUSEDEV"); + mousedev = SDL_getenv("SDL_MOUSEDEV"); if (!mousedev) { - handle = open (mousedev, 0); + handle = open(mousedev, 0); } /* Failed, try default device */ if (handle < 0) { - handle = open (DEVICE_NAME, 0); + handle = open(DEVICE_NAME, 0); } if (handle < 0) { @@ -73,18 +73,18 @@ } /* Set non blocking mode */ - r = fcntl (handle, F_GETFL, 0); + r = fcntl(handle, F_GETFL, 0); if (r < 0) { - close (handle); + close(handle); handle = -1; return 0; } r |= O_NDELAY; - r = fcntl (handle, F_SETFL, r); + r = fcntl(handle, F_SETFL, r); if (r < 0) { - close (handle); + close(handle); handle = -1; return 0; } @@ -94,16 +94,16 @@ } void -SDL_AtariDevMouse_Close (void) +SDL_AtariDevMouse_Close(void) { if (handle > 0) { - close (handle); + close(handle); handle = -1; } } static int -atari_GetButton (int button) +atari_GetButton(int button) { switch (button) { case 0: @@ -118,7 +118,7 @@ } void -SDL_AtariDevMouse_PostMouseEvents (_THIS, SDL_bool buttonEvents) +SDL_AtariDevMouse_PostMouseEvents(_THIS, SDL_bool buttonEvents) { unsigned char buffer[3]; int mousex, mousey; @@ -128,7 +128,7 @@ } mousex = mousey = 0; - while (read (handle, buffer, sizeof (buffer)) == sizeof (buffer)) { + while (read(handle, buffer, sizeof(buffer)) == sizeof(buffer)) { mouseb = buffer[0] & 7; mousex += (char) buffer[1]; mousey += (char) buffer[2]; @@ -144,12 +144,12 @@ prevbutton = prev_mouseb & (1 << i); if (curbutton && !prevbutton) { - SDL_PrivateMouseButton (SDL_RELEASED, - atari_GetButton (i), 0, 0); + SDL_PrivateMouseButton(SDL_RELEASED, + atari_GetButton(i), 0, 0); } if (!curbutton && prevbutton) { - SDL_PrivateMouseButton (SDL_PRESSED, - atari_GetButton (i), 0, 0); + SDL_PrivateMouseButton(SDL_PRESSED, + atari_GetButton(i), 0, 0); } } @@ -159,7 +159,7 @@ /* Mouse motion event */ if (mousex || mousey) { - SDL_PrivateMouseMotion (0, 1, mousex, -mousey); + SDL_PrivateMouseMotion(0, 1, mousex, -mousey); } }