@@ -797,7 +797,7 @@ impl Event {
797
797
window_id,
798
798
win_event
799
799
} => {
800
- let ( win_event_id, data1, data2) = win_event. to_ll ( ) ;
800
+ let ( win_event_id, data1, data2) = win_event. to_ll ( ) ;
801
801
let event = ll:: SDL_WindowEvent {
802
802
type_ : ll:: SDL_WINDOWEVENT ,
803
803
timestamp : timestamp,
@@ -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 ( event. keysym . _mod as SDL_Keymod ) . unwrap ( ) ,
1301
+ keymod : keyboard:: Mod :: from_bits_truncate ( event. keysym . _mod as SDL_Keymod ) ,
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 ( event. keysym . _mod as SDL_Keymod ) . unwrap ( ) ,
1313
+ keymod : keyboard:: Mod :: from_bits_truncate ( event. keysym . _mod as SDL_Keymod ) ,
1314
1314
repeat : event. repeat != 0
1315
1315
}
1316
1316
}
0 commit comments