Lokathor / fermium

An easy to build and use set of SDL2 bindings.
https://docs.rs/fermium
60 stars 14 forks source link

SDL_Keysym fields are private #73

Closed wbogocki closed 3 years ago

wbogocki commented 3 years ago

SDL_Keysym is the type of the SDL_KeyboardEvent's keysym field.

It's relevant because:

match event.type_ {
    SDL_KEYDOWN => {
        if event.key.keysym.sym == SDLK_ESCAPE { // Error, event.key.keysym.sym is private
            done = true;
        }
    },
    _ => (),
}

This is very basic usage so I'm probably just blind and not seeing some obvious right way to do this... however, I searched through the docs and the internet and couldn't figure it out.

Is this an actual omission?

Lokathor commented 3 years ago

Entirely my fault. I copied some code forward from a previous version that had declared structs via macro, so i had to apply the pub by hand and didn't do so in some cases. I'll try to get a fix out right away.

wbogocki commented 3 years ago

Awesome, man. Thanks!

Lokathor commented 3 years ago

published