fix: multiple axis inputs

This commit is contained in:
2019-07-28 03:26:50 +02:00
parent 7bf72001f4
commit a8a34b90f4
3 changed files with 21 additions and 14 deletions

View File

@@ -17,6 +17,10 @@ struct TestGame {
}
impl Game for TestGame {
fn validation_layers_enabled(self: &Self) -> bool {
self.log_config.vulkan_validation_layers
}
fn update(self: &mut Self, game_data: &mut GameData) {
// User interaction
if self.input.button_just_released("QUIT") {
@@ -44,7 +48,7 @@ impl Game for TestGame {
Rad::from(Deg(45.0)),
game_data.dimensions[0] as f32 / game_data.dimensions[1] as f32,
0.1,
10.0
100.0
);
proj.y.y *= -1.0;
@@ -99,10 +103,6 @@ impl Game for TestGame {
_ => {}
}
}
fn validation_layers_enabled(self: &Self) -> bool {
self.log_config.vulkan_validation_layers
}
}
fn main() {