Problem with SDL 1.2 when setting videomode with SDL_SetVideoMode
Posted
by
user574911
on Stack Overflow
See other posts from Stack Overflow
or by user574911
Published on 2011-01-13T21:49:48Z
Indexed on
2011/01/13
21:53 UTC
Read the original article
Hit count: 117
I have a very simple program, in which I am initialising with SDL_Init(flags) and using SDL_SetVideoMode but It fails by returning null.
I think I am missing some config parameters/options, if any one knows about this erro please let me know.
My code is as below :
if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER)) { fprintf(stderr, "Could not initialize SDL\n"); exit(1); }
screen = SDL_SetVideoMode(640, 480, 0, 0);
if(!screen) { fprintf(stderr, "SDL: could not set video mode - exiting\n"); exit(1); }
© Stack Overflow or respective owner