summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Subv2016-11-29 16:51:53 -0500
committerGravatar Subv2016-11-29 16:51:53 -0500
commitaea9a91100e4b80edc8c70d610c102eb2d76dd1f (patch)
treea0258781fb72ee27758442eff3d6b6634cf3b1ee /src
parentMerge pull request #2196 from Subv/system_mode (diff)
downloadyuzu-aea9a91100e4b80edc8c70d610c102eb2d76dd1f.tar.gz
yuzu-aea9a91100e4b80edc8c70d610c102eb2d76dd1f.tar.xz
yuzu-aea9a91100e4b80edc8c70d610c102eb2d76dd1f.zip
Build: Fixed a few warnings.
Diffstat (limited to '')
-rw-r--r--src/common/key_map.cpp8
-rw-r--r--src/video_core/rasterizer.cpp6
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp8
3 files changed, 11 insertions, 11 deletions
diff --git a/src/common/key_map.cpp b/src/common/key_map.cpp
index 79b3fcb18..97cafe9c9 100644
--- a/src/common/key_map.cpp
+++ b/src/common/key_map.cpp
@@ -49,7 +49,7 @@ static bool circle_pad_right = false;
49static bool circle_pad_modifier = false; 49static bool circle_pad_modifier = false;
50 50
51static void UpdateCirclePad(EmuWindow& emu_window) { 51static void UpdateCirclePad(EmuWindow& emu_window) {
52 constexpr float SQRT_HALF = 0.707106781; 52 constexpr float SQRT_HALF = 0.707106781f;
53 int x = 0, y = 0; 53 int x = 0, y = 0;
54 54
55 if (circle_pad_right) 55 if (circle_pad_right)
@@ -61,9 +61,9 @@ static void UpdateCirclePad(EmuWindow& emu_window) {
61 if (circle_pad_down) 61 if (circle_pad_down)
62 --y; 62 --y;
63 63
64 float modifier = circle_pad_modifier ? Settings::values.pad_circle_modifier_scale : 1.0; 64 float modifier = circle_pad_modifier ? Settings::values.pad_circle_modifier_scale : 1.0f;
65 emu_window.CirclePadUpdated(x * modifier * (y == 0 ? 1.0 : SQRT_HALF), 65 emu_window.CirclePadUpdated(x * modifier * (y == 0 ? 1.0f : SQRT_HALF),
66 y * modifier * (x == 0 ? 1.0 : SQRT_HALF)); 66 y * modifier * (x == 0 ? 1.0f : SQRT_HALF));
67} 67}
68 68
69int NewDeviceId() { 69int NewDeviceId() {
diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp
index 6c4bbed33..f81f529b6 100644
--- a/src/video_core/rasterizer.cpp
+++ b/src/video_core/rasterizer.cpp
@@ -562,9 +562,9 @@ static void ProcessTriangleInternal(const Shader::OutputVertex& v0, const Shader
562 }; 562 };
563 563
564 if ((texture.config.wrap_s == Regs::TextureConfig::ClampToBorder && 564 if ((texture.config.wrap_s == Regs::TextureConfig::ClampToBorder &&
565 (s < 0 || s >= texture.config.width)) || 565 (s < 0 || static_cast<u32>(s) >= texture.config.width)) ||
566 (texture.config.wrap_t == Regs::TextureConfig::ClampToBorder && 566 (texture.config.wrap_t == Regs::TextureConfig::ClampToBorder &&
567 (t < 0 || t >= texture.config.height))) { 567 (t < 0 || static_cast<u32>(t) >= texture.config.height))) {
568 auto border_color = texture.config.border_color; 568 auto border_color = texture.config.border_color;
569 texture_color[i] = {border_color.r, border_color.g, border_color.b, 569 texture_color[i] = {border_color.r, border_color.g, border_color.b,
570 border_color.a}; 570 border_color.a};
@@ -947,7 +947,7 @@ static void ProcessTriangleInternal(const Shader::OutputVertex& v0, const Shader
947 // Blend the fog 947 // Blend the fog
948 for (unsigned i = 0; i < 3; i++) { 948 for (unsigned i = 0; i < 3; i++) {
949 combiner_output[i] = 949 combiner_output[i] =
950 fog_factor * combiner_output[i] + (1.0f - fog_factor) * fog_color[i]; 950 static_cast<u8>(fog_factor * combiner_output[i] + (1.0f - fog_factor) * fog_color[i]);
951 } 951 }
952 } 952 }
953 953
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index d4d5903ce..e5f4366c1 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -213,12 +213,12 @@ void RasterizerOpenGL::DrawTriangles() {
213 213
214 // Scissor checks are window-, not viewport-relative, which means that if the cached texture 214 // Scissor checks are window-, not viewport-relative, which means that if the cached texture
215 // sub-rect changes, the scissor bounds also need to be updated. 215 // sub-rect changes, the scissor bounds also need to be updated.
216 GLint scissor_x1 = rect.left + regs.scissor_test.x1 * color_surface->res_scale_width; 216 GLint scissor_x1 = static_cast<GLint>(rect.left + regs.scissor_test.x1 * color_surface->res_scale_width);
217 GLint scissor_y1 = rect.bottom + regs.scissor_test.y1 * color_surface->res_scale_height; 217 GLint scissor_y1 = static_cast<GLint>(rect.bottom + regs.scissor_test.y1 * color_surface->res_scale_height);
218 // x2, y2 have +1 added to cover the entire pixel area, otherwise you might get cracks when 218 // x2, y2 have +1 added to cover the entire pixel area, otherwise you might get cracks when
219 // scaling or doing multisampling. 219 // scaling or doing multisampling.
220 GLint scissor_x2 = rect.left + (regs.scissor_test.x2 + 1) * color_surface->res_scale_width; 220 GLint scissor_x2 = static_cast<GLint>(rect.left + (regs.scissor_test.x2 + 1) * color_surface->res_scale_width);
221 GLint scissor_y2 = rect.bottom + (regs.scissor_test.y2 + 1) * color_surface->res_scale_height; 221 GLint scissor_y2 = static_cast<GLint>(rect.bottom + (regs.scissor_test.y2 + 1) * color_surface->res_scale_height);
222 222
223 if (uniform_block_data.data.scissor_x1 != scissor_x1 || 223 if (uniform_block_data.data.scissor_x1 != scissor_x1 ||
224 uniform_block_data.data.scissor_x2 != scissor_x2 || 224 uniform_block_data.data.scissor_x2 != scissor_x2 ||