[SDL] SDL 1.3 event queue
kanzels at gmail.com
Thu Apr 29 11:54:57 PDT 2010
thank you very much for your clarification, now I understood it correctly.
So the problem is now like this. When you access Cocoa menu, SDL event queue is stopped, however I have few threads that keep running in the background and they push new events to SDL event queue, it then gets full very quickly, because nobody is processing them until I quit the menu.
Is there a way to detect this event queue state and not flood it while it's locked? Or is it possible for SDL_PushEvent to not accept new events while event queue is in this state?? That would be the best behaviour probably...
On 29.4.2010, at 16:05, Kenneth Bull wrote:
> On 29 April 2010 03:19, Pavel Kanzelsberger <kanzels at gmail.com> wrote:
>> Hello guys,
>> I'm playing a little more with SDL on Mac and using Cocoa for main menu.
>> If user goes to the main menu on Mac, or some modal (alert) dialog is
>> displayed from SDL application, after few seconds SDL event queue is somehow
>> locked or inactive and fails to get new events through SDL_PushEvent.
>> SDL_PushEvent starts to return -1 and will not accept new events until I
>> leave the menu.
> Do you mean SDL_PollEvent? SDL_PushEvent is for adding events to the
> queue, not getting them out. If SDL_PushEvent returns -1 it means the
> event queue is full and not accepting new events.
> Cocoa and SDL would both be trying to get events from the OS at the
> same time. If Cocoa gets an event, SDL doesn't and vice versa; they
> don't go to both.
> SDL mailing list
> SDL at lists.libsdl.org
More information about the SDL