shithub: cstory

Download patch

ref: ab82f014aea39a8b12df8ad8759933664308c17c
parent: 8b854a0c9557858c2efa04b57719f27d5df4f3fe
author: Clownacy <Clownacy@users.noreply.github.com>
date: Wed Jul 8 12:05:06 EDT 2020

Avoid some float logic

Also shuts up some VS2019 warnings

--- a/src/Backends/Rendering/Window/Software/GLFW3.cpp
+++ b/src/Backends/Rendering/Window/Software/GLFW3.cpp
@@ -140,7 +140,7 @@
 		viewport_y = 0;
 		viewport_height = height;
 
-		viewport_width = framebuffer_width * ((float)height / (float)framebuffer_height);
+		viewport_width = (framebuffer_width * height) / framebuffer_height;
 		viewport_x = (width - viewport_width) / 2;
 	}
 	else
@@ -148,7 +148,7 @@
 		viewport_x = 0;
 		viewport_width = width;
 
-		viewport_height = framebuffer_height * ((float)width / (float)framebuffer_width);
+		viewport_height = (framebuffer_height * width) / framebuffer_width;
 		viewport_y = (height - viewport_height) / 2;
 	}