mirror of
https://github.com/TheRavenwoodArts/LunaLightXMG.git
synced 2026-07-30 22:55:03 -07:00
Fixed a bug I introduced ;)
This commit is contained in:
+6
-5
@@ -12,8 +12,8 @@ namespace LunaLightXMG
|
||||
private RenderTarget2D renderTarget;
|
||||
private Rectangle renderDestination;
|
||||
|
||||
private float retroWidth;
|
||||
private float retroHeight;
|
||||
private readonly float retroWidth;
|
||||
private readonly float retroHeight;
|
||||
private float zoomLevel = 1.0f;
|
||||
private float zoomTarget = 1.0f;
|
||||
private readonly float zoomMin = 0.50f;
|
||||
@@ -71,10 +71,11 @@ namespace LunaLightXMG
|
||||
// Calculate the integer scale factor
|
||||
float scaleX = screenSize.X / (retroWidth * zoomLevel);
|
||||
float scaleY = screenSize.Y / (retroHeight * zoomLevel);
|
||||
|
||||
float scale = Math.Min(scaleX, scaleY);
|
||||
|
||||
// Set renderDestination
|
||||
renderDestination.Width = (int)(retroWidth * scaleX);
|
||||
renderDestination.Height = (int)(retroHeight * scaleY);
|
||||
renderDestination.Width = (int)(retroWidth * scale);
|
||||
renderDestination.Height = (int)(retroHeight * scale);
|
||||
renderDestination.X = (screenSize.X - renderDestination.Width) / 2;
|
||||
renderDestination.Y = (screenSize.Y - renderDestination.Height) / 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user