summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorRodrigo Locatti <reinuseslisp@airmail.cc>2019-11-13 06:16:22 +0100
committerGitHub <noreply@github.com>2019-11-13 06:16:22 +0100
commitcf770a68a528cdb7f3a5483f6d17eeb924e37b7e (patch)
tree6406933e26e9fbe255a04b4c0810d21b05815494 /src/video_core/renderer_opengl
parentUpdate CONTRIBUTING.md (diff)
parentvideo_core: Enable sign conversion warnings (diff)
downloadyuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.tar
yuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.tar.gz
yuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.tar.bz2
yuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.tar.lz
yuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.tar.xz
yuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.tar.zst
yuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.zip
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp2
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index e560d70d5..e43ba9d6b 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -375,7 +375,7 @@ void RasterizerOpenGL::ConfigureFramebuffers() {
fbkey.color_attachments[index] = GL_COLOR_ATTACHMENT0 + regs.rt_control.GetMap(index);
fbkey.colors[index] = std::move(color_surface);
}
- fbkey.colors_count = regs.rt_control.count;
+ fbkey.colors_count = static_cast<u16>(regs.rt_control.count);
if (depth_surface) {
// Assume that a surface will be written to if it is used as a framebuffer, even if
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index 4bbd17b12..7646cbb0e 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -323,10 +323,12 @@ void RendererOpenGL::DrawScreenTriangles(const ScreenInfo& screen_info, float x,
// (e.g. handheld mode) on a 1920x1080 framebuffer.
f32 scale_u = 1.f, scale_v = 1.f;
if (framebuffer_crop_rect.GetWidth() > 0) {
- scale_u = static_cast<f32>(framebuffer_crop_rect.GetWidth()) / screen_info.texture.width;
+ scale_u = static_cast<f32>(framebuffer_crop_rect.GetWidth()) /
+ static_cast<f32>(screen_info.texture.width);
}
if (framebuffer_crop_rect.GetHeight() > 0) {
- scale_v = static_cast<f32>(framebuffer_crop_rect.GetHeight()) / screen_info.texture.height;
+ scale_v = static_cast<f32>(framebuffer_crop_rect.GetHeight()) /
+ static_cast<f32>(screen_info.texture.height);
}
std::array<ScreenRectVertex, 4> vertices = {{