Re: SDL, keyboard and event handling
- Posted by ghaberek (admin) Nov 01, 2022
- 984 views
ChrisB said...
Hmm, I wonder if I'm doing the wrong sort of peek
The peek/poke_type() and peek/poke_struct() routines are something I made for FFI to help take the guesswork out of peek/peek2s/peek4u/etc. In this case peek4u() would work the same.
ChrisB said...
After all, as far as I can tell, event is structure, not a union.
Unless we're referencing different things, SDL_events.h says SDL_Event is definitely a union. It's designed in a way that the value sitting at the "base" address in memory is always the event type value.
-Greg