|
|
|
@ -1207,7 +1207,7 @@ fn main() {
|
|
|
|
|
// the center of the window and hidden)
|
|
|
|
|
if mouse.relative_mouse_mode() => {
|
|
|
|
|
camera.rotation.y -= xrel as f32 * ROT_MOUSE_SCALE;
|
|
|
|
|
camera.rotation.x += yrel as f32 * ROT_MOUSE_SCALE;
|
|
|
|
|
camera.rotation.x -= yrel as f32 * ROT_MOUSE_SCALE;
|
|
|
|
|
mouse.warp_mouse_in_window(&window, width as i32 / 2, height as i32 / 2);
|
|
|
|
|
}
|
|
|
|
|
_ => {}
|
|
|
|
@ -1259,7 +1259,7 @@ fn main() {
|
|
|
|
|
queue_present(&swapchain_loader, &queue, &swapchain, img_inx, &sem_finish);
|
|
|
|
|
|
|
|
|
|
let elapsed = now.elapsed();
|
|
|
|
|
let delay = (1000_0000u128 / 240).saturating_sub(elapsed.as_micros());
|
|
|
|
|
let delay = (1_000_000u128 / 60).saturating_sub(elapsed.as_micros());
|
|
|
|
|
thread::sleep(Duration::from_micros(delay as u64));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|