SDL_PumpEvent crashes with SDL_USEREVENT

Hello !

I am playing around with the SDL_PumpEvent function.
If I pump an SDL_USEREVENT in the event loop, and my
EventHandler is in the MainThread everything is fine.
If the EventHandler is in an seperate Thread the
Application will freeze. Why is this so ???

I have attached my test programm.Hope someone knows
a splution for this.

Thanks in advance and best regards
-------------- next part --------------
A non-text attachment was scrubbed…
Name: main.c
Type: text/x-c
Size: 2142 bytes
Desc: not available


The mask shouldn’t be SDL_USEREVENT - it should be (1 << SDL_USEREVENT),
I believe.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Woohoo that was quick from the Master himself.
But I don’t understand it.

Regards and thanks

Which part? (Unless Sam is forgetting some details,) SDL_USEREVENT and
the other corresponding defines are defined as numbers in [0, 31], which
means that you can’t OR them together directly to produce a useful event
mask. “1<<SDL_USEREVENT” results in a mask with the bit corresponding to
SDL_USEREVENT set. (The idea is that you should be able to OR several of
these together to deal with multiple event types at once.)

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |--------------------------------------> david at -'On Thursday 06 September 2001 22:58, Anes Lihovac wrote:

Woohoo that was quick from the Master himself.
But I don’t understand it.