[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GFX under Linux



hmm, works fine for me, in my comments i did mess up, to do full screen it 
should be 
screen = SDL_SetVideoMode(800,600,16,SDL_FULLSCREEN); not 
screen = SDL_SetVideoMode(800,600,16,1);

what version of sdl did you use ??
how did you compile it, i called my file test.c and compiled it like this:

gcc test.c -o test `sdl-config --cflags --libs`

**notice that the ` are backticks to the left of the number one and on the 
same key as the ~

mark

On Friday 07 December 2001 01:03, you wrote:
> "Mark D'voo" <line72@postmark.net> wrote:
> >what was so hard about SDL??
> >
> >#include <SDL/SDL.h>
> >
> >int main() {
> >SDL_Surface *screen;
> >if (SDL_Init(SDL_INIT_VIDEO) != 0) {
> >   printf ("unable to initialize sdl: %s\n", SDL_GetError());
> >   return 1;
> >}
> >//make sure sdl quits
> >atexit(SDL_Quit);
> >//open a screen
> >//set the 0 at the end to 1 for full screen mode
> >screen = SDL_SetVideoMode(800,600,16,0);
> >if (screen == NULL) {
> >   printf ("unable to set video mode: %s\n", SDL_GetError());
> >   return 1;
> >}
> >return 0;
> >}
>
> I tried to compile your code, but i got the following error:
> "unable to initialize sdl: Unable to open a console terminal"
>
> Thank you
> NW

-- 
  1:25pm  up 2 days, 26 min,  2 users,  load average: 0.04, 0.10, 0.09