From bf7958029109bf99a6bf018fc99b2aa0499eede7 Mon Sep 17 00:00:00 2001 From: KallDrexx Date: Tue, 13 Jan 2026 20:23:56 -0500 Subject: [PATCH] Fixed incorrect render dimension calculations --- src/Dotnet6502.C64/Integration/MonogameApp.cs | 2 +- src/Dotnet6502.Nes.Cli/MonogameApp.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Dotnet6502.C64/Integration/MonogameApp.cs b/src/Dotnet6502.C64/Integration/MonogameApp.cs index a7c503f..c739dcf 100644 --- a/src/Dotnet6502.C64/Integration/MonogameApp.cs +++ b/src/Dotnet6502.C64/Integration/MonogameApp.cs @@ -185,7 +185,7 @@ public class MonogameApp : Game, IC64Display { // texture has a wider aspect ratio than the viewport, texture is width constrained. width = GraphicsDevice.Viewport.Width; - height = (int)Math.Round(width * textureAspectRatio); + height = (int)Math.Round(width / textureAspectRatio); startY = (GraphicsDevice.Viewport.Height - height) / 2; } else diff --git a/src/Dotnet6502.Nes.Cli/MonogameApp.cs b/src/Dotnet6502.Nes.Cli/MonogameApp.cs index 6cfacc8..67f03aa 100644 --- a/src/Dotnet6502.Nes.Cli/MonogameApp.cs +++ b/src/Dotnet6502.Nes.Cli/MonogameApp.cs @@ -190,7 +190,7 @@ public class MonogameApp : Game, INesDisplay, INesInput { // texture has a wider aspect ratio than the viewport, texture is width constrained. width = GraphicsDevice.Viewport.Width; - height = (int)Math.Round(width * textureAspectRatio); + height = (int)Math.Round(width / textureAspectRatio); startY = (GraphicsDevice.Viewport.Height - height) / 2; } else