avelinohm - 2006-09-07

Hi, all.
   I cannot display a PNG image on my XBox ussing OpenXDK. Here is my piece of code:

#include <hal/video.h>
#include <SDL.h>
#include <SDL_image.h>

SDL_Surface *screen;
SDL_Surface *ball;
SDL_Rect ballDest = {320, 240, 0, 0};

void XBoxStartup(void) {
    XVideoSetVideoEnable(true);
    XVideoSetMode(640, 480, 24, 50);

    SDL_Init(SDL_INIT_VIDEO);
    screen = SDL_SetVideoMode(640, 480, 24, 0);
    ball = IMG_Load("d:\\ball.png");
    SDL_FillRect(screen, NULL, 0xFFFFFFFF);
    SDL_BlitSurface(ball, NULL, screen, &ballDest);
    SDL_UpdateRect(screen, 0, 0, 0, 0);
    while (1)
        ;
}

The screen becomes white because of SDL_FillRect() call, but the "ball.png" is not displayed :-(. I have tested "d:/ball.png", "d:\\ball.png" and "ball.png" as path names for the IMG_Load() function but the problem persists :-(.
Can anyone help me with this proble, please :-(