File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
ash-graphics/ash-graphics/src Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -134,19 +134,17 @@ pub fn main() -> anyhow::Result<()> {
134134 WindowEvent :: KeyboardInput {
135135 event :
136136 winit:: event:: KeyEvent {
137- logical_key : winit:: keyboard:: Key :: Named ( key) ,
137+ logical_key :
138+ winit:: keyboard:: Key :: Named ( winit:: keyboard:: NamedKey :: Escape ) ,
138139 state : winit:: event:: ElementState :: Pressed ,
139140 ..
140141 } ,
141142 ..
142- } => match key {
143- winit:: keyboard:: NamedKey :: Escape => event_loop_window_target. exit ( ) ,
144- _ => { }
145- } ,
143+ }
144+ | WindowEvent :: CloseRequested => event_loop_window_target. exit ( ) ,
146145 WindowEvent :: Resized ( _) => {
147146 swapchain. should_recreate ( ) ;
148147 }
149- WindowEvent :: CloseRequested => event_loop_window_target. exit ( ) ,
150148 _ => { }
151149 }
152150
You can’t perform that action at this time.
0 commit comments