summaryrefslogtreecommitdiff
path: root/src/video_core
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2017-01-24 20:58:11 -0300
committerGitHub <noreply@github.com>2017-01-24 20:58:11 -0300
commit327692ed9df74a1f29a1f293bdaabea33d6cc476 (patch)
treead20317d910b56f468157ac3754e2524f6d015a3 /src/video_core
parent9d0d77de1fc60db446508807735baf496a325a46 (diff)
parent5cc94c17f6cd1e206b84262d34087e89f8767368 (diff)
Merge pull request #2469 from Kloen/killing-warnings
Fixing some MSVC warnings
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp3
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.h2
-rw-r--r--src/video_core/shader/shader.cpp4
3 files changed, 5 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 5a306a5c8..2d2f4edc1 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -748,7 +748,8 @@ bool RasterizerOpenGL::AccelerateDisplayTransfer(const GPU::Regs::DisplayTransfe
// Adjust the source rectangle to take into account parts of the input lines being cropped
if (config.input_width > config.output_width) {
- src_rect.right -= (config.input_width - config.output_width) * src_surface->res_scale_width;
+ src_rect.right -= static_cast<int>((config.input_width - config.output_width) *
+ src_surface->res_scale_width);
}
// Require destination surface to have same resolution scale as source to preserve scaling
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h
index e1a9cb361..cc3e4bed5 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.h
+++ b/src/video_core/renderer_opengl/gl_rasterizer.h
@@ -76,7 +76,7 @@ union PicaShaderConfig {
}
state.fog_mode = regs.fog_mode;
- state.fog_flip = regs.fog_flip;
+ state.fog_flip = regs.fog_flip != 0;
state.combiner_buffer_input = regs.tev_combiner_buffer_input.update_mask_rgb.Value() |
regs.tev_combiner_buffer_input.update_mask_a.Value() << 4;
diff --git a/src/video_core/shader/shader.cpp b/src/video_core/shader/shader.cpp
index a4aa3c9e0..7ae57e619 100644
--- a/src/video_core/shader/shader.cpp
+++ b/src/video_core/shader/shader.cpp
@@ -118,7 +118,7 @@ void ShaderSetup::Run(UnitState& state, const InputVertex& input, int num_attrib
// Setup input register table
const auto& attribute_register_map = config.input_register_map;
- for (unsigned i = 0; i < num_attributes; i++)
+ for (int i = 0; i < num_attributes; i++)
state.registers.input[attribute_register_map.GetRegisterForAttribute(i)] = input.attr[i];
state.conditional_code[0] = false;
@@ -146,7 +146,7 @@ DebugData<true> ShaderSetup::ProduceDebugInfo(const InputVertex& input, int num_
// Setup input register table
boost::fill(state.registers.input, Math::Vec4<float24>::AssignToAll(float24::Zero()));
const auto& attribute_register_map = config.input_register_map;
- for (unsigned i = 0; i < num_attributes; i++)
+ for (int i = 0; i < num_attributes; i++)
state.registers.input[attribute_register_map.GetRegisterForAttribute(i)] = input.attr[i];
state.conditional_code[0] = false;