mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'imbris/fix-7' into 'master'
Fix panic on minimizing window before the game starts up See merge request veloren/veloren!1514
This commit is contained in:
commit
5dbb1aeae7
@ -54,6 +54,9 @@ pub struct Camera {
|
||||
impl Camera {
|
||||
/// Create a new `Camera` with default parameters.
|
||||
pub fn new(aspect: f32, mode: CameraMode) -> Self {
|
||||
// Make sure aspect is valid
|
||||
let aspect = if aspect.is_normal() { aspect } else { 1.0 };
|
||||
|
||||
Self {
|
||||
tgt_focus: Vec3::unit_z() * 10.0,
|
||||
focus: Vec3::unit_z() * 10.0,
|
||||
|
Loading…
Reference in New Issue
Block a user