diff options
| author | LLLL Colonq <llll@colonq> | 2025-01-18 21:53:36 -0500 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2025-01-18 21:53:36 -0500 |
| commit | fdafae3cdcb03a8b7fa736039556bcc465a34959 (patch) | |
| tree | 6d7f004030300c62f31f9d9888c4289c53c0ac5b /src/lib.rs | |
| parent | 6c00c069ccf08ef5e577c16acc78a5b1f53a0f8f (diff) | |
Serializable SDL2 keycodes
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -60,7 +60,7 @@ where // gl_attr.set_context_profile(sdl2::video::GLProfile::Core); // gl_attr.set_context_version(3, 0); let window = video - .window(title, 640, 360) + .window(title, w as _, h as _) .opengl() // .fullscreen_desktop() .resizable() @@ -107,10 +107,10 @@ where st.mouse_released(&ctx) }, sdl2::event::Event::KeyDown { keycode: Some(key), repeat: false, .. } => { - st.key_pressed(&ctx, key) + st.key_pressed(&ctx, state::Keycode::new(key)) }, sdl2::event::Event::KeyUp { keycode: Some(key), repeat: false, .. } => { - st.key_released(&ctx, key) + st.key_released(&ctx, state::Keycode::new(key)) }, _ => {}, } |
