SDL program execution
Just a simple SDL question:
If, while click-holding down on the title bar or in a context menu, is there a way to allow the program to continue to run instead of halting where it is? This does not include rendering, which would be nice but not really needed. At best in windows/directx I think the opposite must be done... it will not halt unless told to do so. At least it seems that way in a couple small programs. Perhaps this is a thread issue? Never done one before ;o)
cheers
[Edited by - Sammy0037 on September 7, 2005 2:46:20 PM]
AFAIK there's nothing you can do about it with plain SDL, because you are effectively keeped out from internal stuff when using this lib. And IIRC, problem you have described is connected with how Windows message pump works - and in SDL part of code which deals with it, is implemented rather internally.
Probably you could workaround it by creating second thread - but don't take my word for it :-)
Probably you could workaround it by creating second thread - but don't take my word for it :-)
I see. Im using SDL in large part to get away from being Windows specific. Also because its easier to manage of course. But yes perhaps making another thread will do it. Or as you say, maybe it wont. I just have to learn how to use one. ;o) Either that or decide whether or not preventing pausing in this manner is important, which isnt a problem when in full screen anyways I guess. At the moment its only in a window. Also need to see if changing focus will cause this as well.
In the end however if things like this are important, and it will do the job, adding Windows also (keeping SDL for others) really isnt hard to do... just a PITA.
Cheers :o)
In the end however if things like this are important, and it will do the job, adding Windows also (keeping SDL for others) really isnt hard to do... just a PITA.
Cheers :o)
From my experience:
- changing focus doesn't cause this behaviour
- when you're in fullscreen, you don't have to worry about clicking on title bar, therefore - such behaviour simply can't exist :-)
IMHO, it's bug of minor importance, so if you're making game, in 99% cases user will be playing in fullscreen. OTOH, implementing multithreading can be very tedious and bug-prone, so I would suggest to ignore it and concentrate on sth else :-)
- changing focus doesn't cause this behaviour
- when you're in fullscreen, you don't have to worry about clicking on title bar, therefore - such behaviour simply can't exist :-)
IMHO, it's bug of minor importance, so if you're making game, in 99% cases user will be playing in fullscreen. OTOH, implementing multithreading can be very tedious and bug-prone, so I would suggest to ignore it and concentrate on sth else :-)
Just as a note, this *bug* per se, not of SDL, but of just the way Windows works, is not something to ignore for your game.
When I was working on an audio library that streamed music earlier this, I discovered that this bug would really mess up the entire audio system. That lead me to have to add in detection code for when a condition such as this happened and handle it properly.
So use that 'feature' to adequately test your program later on as well, since it's a great way to replicate a massive computer slowdown to see how your program will act in that event. So you can definiitly handle it, just not possibly fix it.
When I was working on an audio library that streamed music earlier this, I discovered that this bug would really mess up the entire audio system. That lead me to have to add in detection code for when a condition such as this happened and handle it properly.
So use that 'feature' to adequately test your program later on as well, since it's a great way to replicate a massive computer slowdown to see how your program will act in that event. So you can definiitly handle it, just not possibly fix it.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement