Skip to content

Commit

Permalink
Merge pull request #1378 from hvox/master
Browse files Browse the repository at this point in the history
Fix bug in Keycode type
  • Loading branch information
Cobrand authored Jun 13, 2024
2 parents f3083ef + ef2e678 commit ba37d2e
Show file tree
Hide file tree
Showing 4 changed files with 457 additions and 481 deletions.
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ when upgrading from a version of rust-sdl2 to another.

### Unreleased

[PR #1378](https://github.com/Rust-SDL2/rust-sdl2/pull/1378) **BREAKING CHANGE** Change `Keycode` to be a struct rather than an enum. Fix `Keycode::from_scancode` for non-QWERTY keyboard layouts.

[PR #1368](https://github.com/Rust-SDL2/rust-sdl2/pull/1368) Remove unnecessary unsafe in Window interface. Make Window `Clone`.

[PR #1366](https://github.com/Rust-SDL2/rust-sdl2/pull/1366) Add Primary Selection bindings.
Expand Down
2 changes: 1 addition & 1 deletion src/sdl2/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ where
.unwrap_or(sys::SDL_Scancode::SDL_SCANCODE_UNKNOWN);
let keycode = keycode
.into()
.map(|kc| kc as sys::SDL_Keycode)
.map(|kc| kc.into())
.unwrap_or(sys::SDL_KeyCode::SDLK_UNKNOWN as i32);
let keymod = keymod.bits() as u16;
sys::SDL_Keysym {
Expand Down
Loading

0 comments on commit ba37d2e

Please sign in to comment.