Mercurial > sdl-ios-xcode
comparison src/joystick/amigaos/SDL_sysjoystick.c @ 1336:3692456e7b0f
Use SDL_ prefixed versions of C library functions.
FIXME:
Change #include <stdlib.h> to #include "SDL_stdlib.h"
Change #include <string.h> to #include "SDL_string.h"
Make sure nothing else broke because of this...
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 07 Feb 2006 06:59:48 +0000 |
parents | c9b51268668f |
children | 604d73db6802 |
comparison
equal
deleted
inserted
replaced
1335:c39265384763 | 1336:3692456e7b0f |
---|---|
114 int SDL_SYS_JoystickOpen(SDL_Joystick *joystick) | 114 int SDL_SYS_JoystickOpen(SDL_Joystick *joystick) |
115 { | 115 { |
116 ULONG temp,i; | 116 ULONG temp,i; |
117 D(bug("Opening joystick %ld\n",joystick->index)); | 117 D(bug("Opening joystick %ld\n",joystick->index)); |
118 | 118 |
119 if(!(joystick->hwdata=malloc(sizeof(struct joystick_hwdata)))) | 119 if(!(joystick->hwdata=SDL_malloc(sizeof(struct joystick_hwdata)))) |
120 return -1; | 120 return -1; |
121 | 121 |
122 /* This loop is to check if the controller is a joypad */ | 122 /* This loop is to check if the controller is a joypad */ |
123 | 123 |
124 for(i=0;i<20;i++) | 124 for(i=0;i<20;i++) |
213 | 213 |
214 /* Function to close a joystick after use */ | 214 /* Function to close a joystick after use */ |
215 void SDL_SYS_JoystickClose(SDL_Joystick *joystick) | 215 void SDL_SYS_JoystickClose(SDL_Joystick *joystick) |
216 { | 216 { |
217 if(joystick->hwdata) | 217 if(joystick->hwdata) |
218 free(joystick->hwdata); | 218 SDL_free(joystick->hwdata); |
219 return; | 219 return; |
220 } | 220 } |
221 | 221 |
222 /* Function to perform any system-specific joystick related cleanup */ | 222 /* Function to perform any system-specific joystick related cleanup */ |
223 | 223 |