File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ use sdl::SDL_bool;
8
8
9
9
// SDL_keyboard.h
10
10
#[ derive( Copy , Clone ) ]
11
+ #[ repr( C ) ]
11
12
pub struct SDL_Keysym {
12
13
pub scancode : SDL_Scancode ,
13
14
pub sym : SDL_Keycode ,
Original file line number Diff line number Diff line change @@ -1298,7 +1298,7 @@ impl Event {
1298
1298
window_id : event. windowID ,
1299
1299
keycode : Keycode :: from_i32 ( event. keysym . sym as i32 ) ,
1300
1300
scancode : Scancode :: from_i32 ( event. keysym . scancode as i32 ) ,
1301
- keymod : keyboard:: Mod :: from_bits_truncate ( event. keysym . _mod as SDL_Keymod ) ,
1301
+ keymod : keyboard:: Mod :: from_bits ( event. keysym . _mod as SDL_Keymod ) . unwrap ( ) ,
1302
1302
repeat : event. repeat != 0
1303
1303
}
1304
1304
}
@@ -1310,7 +1310,7 @@ impl Event {
1310
1310
window_id : event. windowID ,
1311
1311
keycode : Keycode :: from_i32 ( event. keysym . sym as i32 ) ,
1312
1312
scancode : Scancode :: from_i32 ( event. keysym . scancode as i32 ) ,
1313
- keymod : keyboard:: Mod :: from_bits_truncate ( event. keysym . _mod as SDL_Keymod ) ,
1313
+ keymod : keyboard:: Mod :: from_bits ( event. keysym . _mod as SDL_Keymod ) . unwrap ( ) ,
1314
1314
repeat : event. repeat != 0
1315
1315
}
1316
1316
}
You can’t perform that action at this time.
0 commit comments