Re: accessing C union members...

new topic     » goto parent     » topic index » view thread      » older message » newer message
ssallen said...

I want to check the type field in the event union and if it equals SDL_MOUSEBUTTONDOWN then I want to check the button field that is part of the struct. Any help is appreciated!

It looks like you're doing the detection of SDL_MOUSEBUTTONDOWN correctly. The button should be at sdl_event + 2, so you should be able to read it with peek( sdl_event + 2 ).

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu