Original Post
Hey guys,
I try to add an event filter, but it always returns the same event-type - the event code is always 80.
My code looks like this:
Please note, that the game will be created with the programming language d and writefln(e.type) is always 80.
I hope anyone know what's the problem :)
[Edited by - nrgyzer on October 3, 2010 5:47:39 AM]
I try to add an event filter, but it always returns the same event-type - the event code is always 80.
My code looks like this:
SDL_Event evt;...void main() { SDL_SetEventFilter(cast(SDL_EventFilter) &_filter); ... while(...) { checkEvents(); }}void checkEvents() { while(SDL_PollEvent(&evt)) { switch(evt.type) { case SDL_MOUSEBUTTONUP: // do something break; default: break; } }}int _filter(SDL_Event *e) { if (e.type == SDL_MOUSEBUTTONUP) { writefln(e.type); return 1; } return 0;}...Please note, that the game will be created with the programming language d and writefln(e.type) is always 80.
I hope anyone know what's the problem :)
[Edited by - nrgyzer on October 3, 2010 5:47:39 AM]