[SDL] i m gonna be made

William Brodie-Tyrrell william at brodie-tyrrell.org
Tue Oct 10 03:21:20 PDT 2006


Stoned koala bears drooled eucalyptus spit in awe as Wael Adel said:

> hi all I have attached an image that describes my problem.
> If u download this image and open it U will find  a window written to it(in
> the top ofit):
> 
>                                           SDL_app

yep.

> my main problem is what is the command od SDL package that helps me creating
> that window then writting to it SDL_app?
> 
> I have made the following:
> 
> SDL_Init( SDL_INIT_EVERYTHING );
> 
> SDL_Surface *screen = SDL_SetVideoMode(640,480,32, SDL_HWSURFACE );
> 
> SDL_WM_SetCaption( "SDL_app",NULL );

I don't see the problem.  You've told it you want a caption of
"SDL_app" and the caption is indeed "SDL_app".

>  but did not get that window as shown in the attached image?

How so?  Is that image not of your app but perhaps an example that
you're trying to replicate?

I'm not sure where the window updates occur but make sure you are
processing all the events being sent to your application, e.g.:

/* Check for events */
while(SDL_PollEvent(&event)){
	switch(event.type){  /* Inspect the event type */ 
	case SDL_KEYDOWN:  /* Handle a KEYDOWN event */ 
		printf("Oh! Keypress\n"); 
		break;
	case SDL_MOUSEMOTION:
		/* etc */
		break;
	default: /* Report an unhandled event */
		printf("I don't know what this event is!\n");
	}
}



-- 
William Brodie-Tyrrell

Carpe Diem - fish of the day.

<william at brodie-tyrrell.org>
http://www.brodie-tyrrell.org/




More information about the SDL mailing list