All pastes #749446 Raw Edit

Anonymous

public text v1 · immutable
#749446 ·published 2007-10-25 18:18 UTC
rendered paste body
SDL_Surface* f_init_screen()
{
	printf("Attemping to initialize SDL Video\n");
	SDL_Surface *v_screen;
	if (SDL_Init(SDL_INIT_VIDEO) != 0)
	{
        	printf("Unable to initialize SDL: %s\n", SDL_GetError());
        	return NULL;
    	}
	
	printf("Attemping to set the video mode\n");
	v_screen = SDL_SetVideoMode(1000, 1000, 16, 0);
    	if (v_screen == NULL)
    	{
        	printf("Unable to set video mode: %s\n", SDL_GetError());
        	return NULL;
    	}
	printf("Video Mode set correctly at %dx%d\n",v_screen->w,v_screen->h);
	return v_screen;
}