Hi.
The images for the mouse icons are currently hardcoded into the source. It works fine on Windows, just not on the xbox. This leads me to think the sdl cursor stuff is for operating systems that have cursors as standard to take over.
Im currently testing some other way using an image thats mapped to the mouse, like so:
CODE
SDL_ShowCursor(0);//don't display the normal cursor
SDL_Surface *screen;//surface for mouse
SDL_Surface *MouseImage=SDL_LoadBMP("mouse.bmp");//load up some BMP
int MouseX, MouseY;//for mouse coordinates
while(game is running)
{
SDL_GetMouseState(&MouseX, &MouseY);//get the coordinates of the mouse on the screen
DrawBMP(MouseImage, MouseX, MouseY);//draw the mouse on the screen
}
void DrawBMP(SDL_Surface *bmp, int x, int y)//drawing function
{
SDL_Rect rect;
rect.x = x;
rect.y = y;
SDL_BlitSurface(bmp, NULL, screen, &rect);
}
But its making multiple copies of itself like so:

Just for a heads up, the original mouse cursor code is:
CODE
void SystemSDL::hideCursor()
{
if (SDL_ShowCursor(-1))
SDL_ShowCursor(SDL_DISABLE);
}
void SystemSDL::showCursor()
{
if (!SDL_ShowCursor(-1))
SDL_ShowCursor(SDL_ENABLE);
}
void SystemSDL::usePointerCursor()
{
static SDL_Cursor *pointerCursor = NULL;
if (pointerCursor == NULL) {
int b = 0;
int w = 12;
int t = 255;
// TODO: be nice to use the real sprite, but I can't find it.
uint8 orig[32 * 32] = {
b, b, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
b, w, b, b, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, b, w, w, b, b, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, b, w, w, w, w, b, b, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, b, w, w, w, w, w, b, b, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, b, w, w, w, w, w, w, w, b, b, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, b, w, w, w, w, w, w, w, w, b, b, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, b, w, w, w, w, w, w, w, w, b, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, b, w, w, w, w, w, w, b, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, b, w, w, w, w, w, w, b, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, b, w, w, w, w, w, w, b, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, b, w, w, b, b, w, w, w, b, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, t, b, b, t, t, b, w, w, w, b, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, t, b, t, t, t, t, b, w, w, w, b, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, t, t, t, t, t, t, t, b, w, w, b, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, t, t, t, t, t, t, t, t, b, b, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t,
};
uint8 data[4 * 32], mask[4 * 32];
memset(data, 0, sizeof(data));
memset(mask, 0, sizeof(mask));
for (int j = 0; j < 32; j++)
for (int i = 0; i < 32; i++) {
if (j < 6 || i < 6 || j >= 32 || i >= 32)
continue;
if (orig[(i - 6) + (j - 6) * 32] == t)
continue;
if (orig[(i - 6) + (j - 6) * 32] == b)
data[(i / 8) + j * 4] |= 128 >> (i % 8);
mask[(i / 8) + j * 4] |= 128 >> (i % 8);
}
if (pointerCursor == NULL)
pointerCursor = SDL_GetCursor();
pointerCursor =
SDL_CreateCursor(data, mask, 32, 32, 8, 8);
}
SDL_SetCursor(pointerCursor);
}
Which is then called up with:
CODE
g_System.usePointerCursor();
Sorry for long post but Im desperate!