Mercurial > sdl-ios-xcode
comparison src/joystick/riscos/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 |
---|---|
87 */ | 87 */ |
88 int SDL_SYS_JoystickOpen(SDL_Joystick *joystick) | 88 int SDL_SYS_JoystickOpen(SDL_Joystick *joystick) |
89 { | 89 { |
90 _kernel_swi_regs regs; | 90 _kernel_swi_regs regs; |
91 | 91 |
92 if(!(joystick->hwdata=malloc(sizeof(struct joystick_hwdata)))) | 92 if(!(joystick->hwdata=SDL_malloc(sizeof(struct joystick_hwdata)))) |
93 return -1; | 93 return -1; |
94 | 94 |
95 regs.r[0] = joystick->index; | 95 regs.r[0] = joystick->index; |
96 | 96 |
97 /* Don't know how to get exact count of buttons so assume max of 4 for now */ | 97 /* Don't know how to get exact count of buttons so assume max of 4 for now */ |
159 | 159 |
160 /* Function to close a joystick after use */ | 160 /* Function to close a joystick after use */ |
161 void SDL_SYS_JoystickClose(SDL_Joystick *joystick) | 161 void SDL_SYS_JoystickClose(SDL_Joystick *joystick) |
162 { | 162 { |
163 if(joystick->hwdata) | 163 if(joystick->hwdata) |
164 free(joystick->hwdata); | 164 SDL_free(joystick->hwdata); |
165 return; | 165 return; |
166 } | 166 } |
167 | 167 |
168 /* Function to perform any system-specific joystick related cleanup */ | 168 /* Function to perform any system-specific joystick related cleanup */ |
169 void SDL_SYS_JoystickQuit(void) | 169 void SDL_SYS_JoystickQuit(void) |