summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorChin <chin.bimbo@gmail.com>2014-12-20 04:16:34 +0100
committerChin <chin.bimbo@gmail.com>2014-12-20 16:03:36 +0100
commite7956926147d2d2ac6741aee8a150466a5438ca3 (patch)
tree8a06a500c34248c12fff47998131742c4ca72390 /src/video_core/renderer_opengl
parentMerge pull request #309 from chinhodado/patch-1 (diff)
downloadyuzu-e7956926147d2d2ac6741aee8a150466a5438ca3.tar
yuzu-e7956926147d2d2ac6741aee8a150466a5438ca3.tar.gz
yuzu-e7956926147d2d2ac6741aee8a150466a5438ca3.tar.bz2
yuzu-e7956926147d2d2ac6741aee8a150466a5438ca3.tar.lz
yuzu-e7956926147d2d2ac6741aee8a150466a5438ca3.tar.xz
yuzu-e7956926147d2d2ac6741aee8a150466a5438ca3.tar.zst
yuzu-e7956926147d2d2ac6741aee8a150466a5438ca3.zip
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index e2caeeb8f..e20d7adb7 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -240,14 +240,14 @@ MathUtil::Rectangle<unsigned> RendererOpenGL::GetViewportExtent() {
MathUtil::Rectangle<unsigned> viewport_extent;
if (window_aspect_ratio > emulation_aspect_ratio) {
// Window is narrower than the emulation content => apply borders to the top and bottom
- unsigned viewport_height = std::round(emulation_aspect_ratio * framebuffer_width);
+ unsigned viewport_height = static_cast<unsigned>(std::round(emulation_aspect_ratio * framebuffer_width));
viewport_extent.left = 0;
viewport_extent.top = (framebuffer_height - viewport_height) / 2;
viewport_extent.right = viewport_extent.left + framebuffer_width;
viewport_extent.bottom = viewport_extent.top + viewport_height;
} else {
// Otherwise, apply borders to the left and right sides of the window.
- unsigned viewport_width = std::round(framebuffer_height / emulation_aspect_ratio);
+ unsigned viewport_width = static_cast<unsigned>(std::round(framebuffer_height / emulation_aspect_ratio));
viewport_extent.left = (framebuffer_width - viewport_width) / 2;
viewport_extent.top = 0;
viewport_extent.right = viewport_extent.left + viewport_width;