Don't default to max zoom when there's no current texture.

This commit is contained in:
baldurk
2016-06-09 10:49:04 -07:00
parent 65d407d5a8
commit 6ddba5f0ad
+2
View File
@@ -2387,6 +2387,8 @@ namespace renderdocui.Windows
private float GetFitScale()
{
if (CurrentTexture == null)
return 1.0f;
float xscale = (float)render.Width / (float)CurrentTexDisplayWidth;
float yscale = (float)render.Height / (float)CurrentTexDisplayHeight;
return Math.Min(xscale, yscale);