File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 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;
88
99// SDL_keyboard.h
1010#[ derive( Copy , Clone ) ]
11+ #[ repr( C ) ]
1112pub struct SDL_Keysym {
1213 pub scancode : SDL_Scancode ,
1314 pub sym : SDL_Keycode ,
Original file line number Diff line number Diff line change @@ -1298,7 +1298,7 @@ impl Event {
12981298 window_id : event. windowID ,
12991299 keycode : Keycode :: from_i32 ( event. keysym . sym as i32 ) ,
13001300 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 ( ) ,
13021302 repeat : event. repeat != 0
13031303 }
13041304 }
@@ -1310,7 +1310,7 @@ impl Event {
13101310 window_id : event. windowID ,
13111311 keycode : Keycode :: from_i32 ( event. keysym . sym as i32 ) ,
13121312 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 ( ) ,
13141314 repeat : event. repeat != 0
13151315 }
13161316 }
You can’t perform that action at this time.
0 commit comments