Fixed perspective crash and project paths when creating a new project

This commit is contained in:
antopilo
2023-04-08 21:37:41 -04:00
parent 3519b67a72
commit 076ac59283
2 changed files with 26 additions and 27 deletions

View File

@@ -271,6 +271,13 @@ namespace Nuake {
return;
Vector2 size = m_Framebuffer->GetSize();
if (size.x < 1 || size.y < 1)
{
size.x = 1.0;
size.y = 1.0;
}
cam->AspectRatio = size.x / size.y;
m_Scene->m_EditorCamera->OnWindowResize(size.x, size.y);