Fix Dpi issues when RootWindow is null

Fix #344
This commit is contained in:
Wojtek Figat
2021-03-17 00:04:16 +01:00
parent 878fee505f
commit 691df4cb80
6 changed files with 16 additions and 11 deletions

View File

@@ -224,7 +224,7 @@ namespace FlaxEngine.GUI
/// </summary>
public void SyncBackbufferSize()
{
float scale = ResolutionScale * (RootWindow?.DpiScale ?? Platform.DpiScale);
float scale = ResolutionScale * DpiScale;
int width = Mathf.CeilToInt(Width * scale);
int height = Mathf.CeilToInt(Height * scale);
if (_customResolution.HasValue)