brson / rust-sdl

SDL bindings for Rust
MIT License
179 stars 52 forks source link

event::get_key_state() returns bogus Key values #57

Closed ben0x539 closed 11 years ago

ben0x539 commented 11 years ago

I tried to use fmt!("%?", sdl::event::get_key_state()) and it failed with

rust: task failed at 'enum value matched no variant', [...]/rust/src/libcore/repr.rs:628

The first (Key, bool) pair at fault seems to be the one where the Key tag is represented by 10, which isn't filtered by wrap_key() yet isn't defined as a variant of the enum, so I guess it's not filtering the right ranges.

AngryLawyer commented 11 years ago

I'll take a look at this.

AngryLawyer commented 11 years ago

Finally gotten around to taking a look at this and I can confirm that, yes, it's still broken.

Working on a fix now.