mirror of
https://github.com/exoticorn/microw8.git
synced 2026-01-20 11:16:42 +01:00
fix square filter, arrow keys on windows
This commit is contained in:
@@ -126,15 +126,17 @@ impl Window {
|
||||
WindowEvent::KeyboardInput { input, .. } => {
|
||||
fn gamepad_button(input: &winit::event::KeyboardInput) -> u32 {
|
||||
match input.scancode {
|
||||
103 => 1,
|
||||
108 => 2,
|
||||
105 => 4,
|
||||
106 => 8,
|
||||
44 => 16,
|
||||
45 => 32,
|
||||
30 => 64,
|
||||
31 => 128,
|
||||
_ => 0,
|
||||
_ => match input.virtual_keycode {
|
||||
Some(VirtualKeyCode::Up) => 1,
|
||||
Some(VirtualKeyCode::Down) => 2,
|
||||
Some(VirtualKeyCode::Left) => 4,
|
||||
Some(VirtualKeyCode::Right) => 8,
|
||||
_ => 0,
|
||||
},
|
||||
}
|
||||
}
|
||||
if input.state == winit::event::ElementState::Pressed {
|
||||
|
||||
@@ -32,7 +32,7 @@ fn aa_tex_coord(c: f32) -> f32 {
|
||||
let center = base + 0.5;
|
||||
let next = base + 1.0;
|
||||
if high > next {
|
||||
return center + (high - next) / (high - base);
|
||||
return center + (high - next) / (high - low);
|
||||
} else {
|
||||
return center;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user