hey vivi, thanks for letting me know. but i do infact have atexit(SDL_Quit)
after i initialize the screen, and also i have a function called
Close_Audio() which halts the music, closes the channels, and closes
sdl_mixer, so i dont know what problem you could be having with that. thanks
for checking it out tho>From: sdl-request at libsdl.org
Reply-To: sdl at libsdl.org
To: sdl at libsdl.org
Subject: SDL digest, Vol 1 #1076 - 9 msgs
Date: Sun, 29 Feb 2004 12:02:19 -0800Send SDL mailing list submissions to
sdl at libsdl.orgTo subscribe or unsubscribe via the World Wide Web, visit
http://www.libsdl.org/mailman/listinfo/sdl
or, via email, send a message with subject or body ‘help’ to
sdl-request at libsdl.orgYou can reach the person managing the list at
sdl-admin at libsdl.orgWhen replying, please edit your Subject line so it is more specific
than “Re: Contents of SDL digest…”Today’s Topics:
- Accessing internal X11 Display (Morgan McGuire)
- Re: Accessing internal X11 Display
(Ignacio Castano)- processing events in a thread (Jon Willeke)
- RE: SDL digest, Vol 1 #1075 - 17 msgs (Graveyard Filla)
- RE: fellow SDL’ers, please critisize my code and game!!! (Vivi
Orunitia)- how do I get a .lib ? (marting at webklan.com)
- Re: how do I get a .lib ? (Arne Claus)
- Re: processing events in a thread (Sam Lantinga)
- Re: processing events in a thread (Jon Willeke)
–––
Message: 1
Date: Sat, 28 Feb 2004 12:02:37 -0800 (PST)
From: Morgan McGuire
To: sdl at libsdl.org
Subject: [SDL] Accessing internal X11 Display
Reply-To: sdl at libsdl.orgI need to access the X11 Display* pointer used by SDL in order to go around
the
SDL abstraction to communicate with a lower-level library.The Display* is stored in current_video->hidden->X11_Display within SDL. I
cannot find a way to access current_video or get the Display* value
directly
from SDL.Suggestions?
-m
=====
Morgan McGuire
morgan3d at yahoo.com
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools–––
Message: 2
Date: Sat, 28 Feb 2004 21:41:11 +0100
From: Ignacio Castano
To: sdl at libsdl.org
Subject: Re: [SDL] Accessing internal X11 Display
Reply-To: sdl at libsdl.orgMorgan McGuire wrote:
I need to access the X11 Display* pointer used by SDL in order to go
around the
SDL abstraction to communicate with a lower-level library.The Display* is stored in current_video->hidden->X11_Display within SDL.
I
cannot find a way to access current_video or get the Display* value
directly
from SDL.Suggestions?
Morgan,
look in SDL_syswm.h there’s a system dependant struct that on unix
systems contains the Display pointer. To fill that struct do as follows:SDL_SysWMinfo info;
SDL_VERSION( &info.version );
SDL_GetWMInfo( &info );Hope that helps.
–
Ignacio Casta?o
castanyo at yahoo.es–––
Message: 3
Date: Sat, 28 Feb 2004 17:13:41 -0500
To: sdl at libsdl.org
From: Jon Willeke
Subject: [SDL] processing events in a thread
Reply-To: sdl at libsdl.orgAccording to the documentation, “You can only call [SDL_PumpEvents()] in
the thread that set the video mode.” In fact, SDL_PumpEvents() seems to be
dependent on SDL_Init(), rather than SDL_SetVideoMode().The following program (shortened as much as possible) displays a window for
five seconds:#include “SDL.h”
#include “SDL_thread.h”
#undef mainint
event_loop( void *init )
{
Uint32 start;SDL_Init( SDL_INIT_VIDEO );
SDL_CondSignal( (SDL_cond *)init );start = SDL_GetTicks();
while( SDL_GetTicks() - start < 5000 ) {
SDL_PumpEvents();
SDL_Delay( 1 );
}return 0;
}int
main()
{
SDL_Thread *thread;
SDL_cond *initialized;
SDL_mutex *init_mutex;
SDL_Surface *screen;initialized = SDL_CreateCond();
thread = SDL_CreateThread( event_loop, initialized );init_mutex = SDL_CreateMutex();
SDL_mutexP( init_mutex );
SDL_CondWait( initialized, init_mutex );screen = SDL_SetVideoMode( 800, 600, 32, SDL_SWSURFACE );
SDL_WaitThread( thread, NULL );
SDL_Quit();return 0;
}–––
Message: 4
From: “Graveyard Filla” <@Graveyard_Filla>
To: sdl at libsdl.org
Date: Sun, 29 Feb 2004 05:43:57 +0000
Subject: [SDL] RE: SDL digest, Vol 1 #1075 - 17 msgs
Reply-To: sdl at libsdl.orgif you dont have windows, you can download a .zip of the game itself from
http://www.geocities.com/graveyardfilla44thanks!!!
Find and compare great deals on Broadband access at the MSN High-Speed
Marketplace. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/–––
Message: 5
To: sdl at libsdl.org
From: Vivi Orunitia
Date: Sun, 29 Feb 2004 07:03:55 +0000 (UTC)
Organization: Black Mage Village
Subject: [SDL] RE: fellow SDL’ers, please critisize my code and game!!!
Reply-To: sdl at libsdl.org“Graveyard Filla” <@Graveyard_Filla> wrote in
news:Law9-F90M2AWdo187B4000141cd at hotmail.com:high,
this is only my second post on this mailing list, and so far i love
it. i cant find ANYONE on the internet who knows anything about SDL.
its really a shame because this API is so great. i wish this was a
forum =). anyway, i just finished making my first game (a pong clone
with a twist). and i would REALLY appreciate it if someone would check
out my code and critisize it and tell me if im doing anything
extremely wrong. i put this on gamedev forums, but people just played
the game and didnt look at the source because no one knows SDL. thats
why im turning to you guys. heres the link to get the game/sourceor if that link is down go to
http://www.geocities.com/graveyardfilla44
as soon as you go to one of those pages you will be shown a link to
download the .exe or the .zip for the source. thanks guys, i
appreciate it!!ps- if you do read it, forgive me when you get to the draw_score
function. i know its sloppy, but i got to lazy to fix it =)
Take off on a romantic weekend or a family adventure to these great
U.S. locations. http://special.msn.com/local/hotdestinations.armxI probably should have mentioned this also when I was explaining
spudder’s post. I think you forgot to free the surface of your games and
freed the sound too. When I press escape in the game, the music stops
playing where it is and just keeps playing that last note continuously
like an annoying pitch. Know what I mean?–––
Message: 6
Date: Sun, 29 Feb 2004 09:41:27 -0300 (ART)
From:
To:
Subject: [SDL] how do I get a .lib ?
Reply-To: sdl at libsdl.orgI want to use GUIlib the little GUI api used in some samples. Im trying
to
use it in windows
I compile the dll perfectly 0 errors 0 warnings. But I dont know how to
obtain
the .lib file from the project. Is there some setting in the properties
what I am
missing ?
I am using VC6 .Thanks in advance.
Martin
–––
Message: 7
Date: Sun, 29 Feb 2004 19:17:33 +0100
From: Arne Claus
To: sdl at libsdl.org
Subject: Re: [SDL] how do I get a .lib ?
Reply-To: sdl at libsdl.orgmarting at webklan.com wrote:
I want to use GUIlib the little GUI api used in some samples. Im
trying to
use it in windows
I compile the dll perfectly 0 errors 0 warnings. But I dont know how to
obtain
the .lib file from the project. Is there some setting in the properties
what I am
missing ?
I am using VC6 .Try setting the path of your output file by hand to ($OUTDIR)/mylib.lib
or something like that (sorry - don’t have vc here now). VC does
something like ($OUTDIR)/($PROJECTNAME).lib - that doesn’t work.BR
Arne–––
Message: 8
To: sdl at libsdl.org
Subject: Re: [SDL] processing events in a thread
From: Sam Lantinga
Date: Sun, 29 Feb 2004 10:22:51 -0800
Reply-To: sdl at libsdl.orgAccording to the documentation, “You can only call [SDL_PumpEvents()] in
the thread that set the video mode.” In fact, SDL_PumpEvents() seems to
be
dependent on SDL_Init(), rather than SDL_SetVideoMode().The following program (shortened as much as possible) displays a window
for
five seconds:[snipped]
Is this a question or a statement?
Your program will run just fine, but it won’t actually get any events.
SDL doesn’t crash if you call SDL_PumpEvents() in another thread, it
just won’t do anything.See ya!
-Sam Lantinga, Software Engineer, Blizzard Entertainment–––
Message: 9
Date: Sun, 29 Feb 2004 13:59:42 -0500
To: sdl at libsdl.org
From: Jon Willeke
Subject: Re: [SDL] processing events in a thread
Reply-To: sdl at libsdl.orgAt 10:22 AM 2/29/2004 -0800, Sam Lantinga wrote:
According to the documentation, "You can only call [SDL_PumpEvents()]
inthe thread that set the video mode." In fact, SDL_PumpEvents() seems
to be
dependent on SDL_Init(), rather than SDL_SetVideoMode().The following program (shortened as much as possible) displays a
window
forfive seconds:
[snipped]
Is this a question or a statement?Yes.
Your program will run just fine, but it won’t actually get any events.
SDL doesn’t crash if you call SDL_PumpEvents() in another thread, it
just won’t do anything.I changed the PumpEvents() call to PollEvent() and it handles an SDL_QUIT
event fine. Is there, in fact, any dependency on SetVideoMode(), or can I
safely leave the event loop in its own thread?–––
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdlEnd of SDL Digest
Stay informed on Election 2004 and the race to Super Tuesday.
http://special.msn.com/msn/election2004.armx