I’m trying to port SDL into a simple operating system, called uCore.
And, I have written the video driver for ucore frame buffer, and added
corresponding support in SDL configuration files. But I found that even
though the program could run, no bitmap was displayed.
The test code is like:
int main( int argc, char* args )
SDL_Surface* hello = NULL;
SDL_Surface* screen = NULL;
//Start SDL SDL_Init( SDL_INIT_EVERYTHING ); //Set up screen screen = SDL_SetVideoMode( 640, 480, 32, SDL_SWSURFACE ); //Load image hello = SDL_LoadBMP( "hello.bmp" ); //Apply image to screen SDL_BlitSurface( hello, NULL, screen, NULL ); //Update Screen SDL_Flip( screen ); //Pause SDL_Delay( 2000 ); //Free the loaded image SDL_FreeSurface( hello ); //Quit SDL SDL_Quit(); return 0;
I wonder which modules are involved when running the test code apart from
Thanks a lot!–
Peiyun Hu ???
Department of Computer Science and Technology, Tsinghua University
Zip Code: 100084