Mercurial > sdl-ios-xcode
comparison src/video/riscos/SDL_riscosmouse.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 |
---|---|
58 void WIMP_SetSDLCursorPalette(); | 58 void WIMP_SetSDLCursorPalette(); |
59 | 59 |
60 | 60 |
61 void RISCOS_FreeWMCursor(_THIS, WMcursor *cursor) | 61 void RISCOS_FreeWMCursor(_THIS, WMcursor *cursor) |
62 { | 62 { |
63 free(cursor->data); | 63 SDL_free(cursor->data); |
64 free(cursor); | 64 SDL_free(cursor); |
65 } | 65 } |
66 | 66 |
67 WMcursor *RISCOS_CreateWMCursor(_THIS, | 67 WMcursor *RISCOS_CreateWMCursor(_THIS, |
68 Uint8 *data, Uint8 *mask, int w, int h, int hot_x, int hot_y) | 68 Uint8 *data, Uint8 *mask, int w, int h, int hot_x, int hot_y) |
69 { | 69 { |
78 SDL_SetError("Only with width and height <= 32 pixels are allowed"); | 78 SDL_SetError("Only with width and height <= 32 pixels are allowed"); |
79 return(NULL); | 79 return(NULL); |
80 } | 80 } |
81 | 81 |
82 /* Allocate the cursor */ | 82 /* Allocate the cursor */ |
83 cursor = (WMcursor *)malloc(sizeof(*cursor)); | 83 cursor = (WMcursor *)SDL_malloc(sizeof(*cursor)); |
84 if ( cursor == NULL ) { | 84 if ( cursor == NULL ) { |
85 SDL_SetError("Out of memory"); | 85 SDL_SetError("Out of memory"); |
86 return(NULL); | 86 return(NULL); |
87 } | 87 } |
88 | 88 |
89 /* Note: SDL says width must be a multiple of 8 */ | 89 /* Note: SDL says width must be a multiple of 8 */ |
90 cursor_data = malloc(w/4 * h); | 90 cursor_data = SDL_malloc(w/4 * h); |
91 if (cursor_data == NULL) | 91 if (cursor_data == NULL) |
92 { | 92 { |
93 free(cursor); | 93 SDL_free(cursor); |
94 SDL_SetError("Out of memory"); | 94 SDL_SetError("Out of memory"); |
95 return(NULL); | 95 return(NULL); |
96 } | 96 } |
97 | 97 |
98 cursor->w = w; | 98 cursor->w = w; |