mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-23 22:25:55 +00:00
Don't default to max zoom when there's no current texture.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user