summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2017-01-24 20:58:11 -0300
committerGravatar GitHub2017-01-24 20:58:11 -0300
commit327692ed9df74a1f29a1f293bdaabea33d6cc476 (patch)
treead20317d910b56f468157ac3754e2524f6d015a3 /src
parentgithub: fixed issue template forum links (#2470) (diff)
parentvideo_core: fix shader.cpp signed / unsigned warning (diff)
downloadyuzu-327692ed9df74a1f29a1f293bdaabea33d6cc476.tar.gz
yuzu-327692ed9df74a1f29a1f293bdaabea33d6cc476.tar.xz
yuzu-327692ed9df74a1f29a1f293bdaabea33d6cc476.zip
Merge pull request #2469 from Kloen/killing-warnings
Fixing some MSVC warnings
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/mic_u.cpp8
-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
4 files changed, 9 insertions, 8 deletions
diff --git a/src/core/hle/service/mic_u.cpp b/src/core/hle/service/mic_u.cpp
index c62f8afc6..e98388560 100644
--- a/src/core/hle/service/mic_u.cpp
+++ b/src/core/hle/service/mic_u.cpp
@@ -93,7 +93,7 @@ static void StartSampling(Interface* self) {
93 sample_rate = static_cast<SampleRate>(cmd_buff[2] & 0xFF); 93 sample_rate = static_cast<SampleRate>(cmd_buff[2] & 0xFF);
94 audio_buffer_offset = cmd_buff[3]; 94 audio_buffer_offset = cmd_buff[3];
95 audio_buffer_size = cmd_buff[4]; 95 audio_buffer_size = cmd_buff[4];
96 audio_buffer_loop = static_cast<bool>(cmd_buff[5] & 0xFF); 96 audio_buffer_loop = (cmd_buff[5] & 0xFF) != 0;
97 97
98 cmd_buff[1] = RESULT_SUCCESS.raw; // No error 98 cmd_buff[1] = RESULT_SUCCESS.raw; // No error
99 is_sampling = true; 99 is_sampling = true;
@@ -202,7 +202,7 @@ static void GetGain(Interface* self) {
202 */ 202 */
203static void SetPower(Interface* self) { 203static void SetPower(Interface* self) {
204 u32* cmd_buff = Kernel::GetCommandBuffer(); 204 u32* cmd_buff = Kernel::GetCommandBuffer();
205 mic_power = static_cast<bool>(cmd_buff[1] & 0xFF); 205 mic_power = (cmd_buff[1] & 0xFF) != 0;
206 cmd_buff[1] = RESULT_SUCCESS.raw; // No error 206 cmd_buff[1] = RESULT_SUCCESS.raw; // No error
207 LOG_WARNING(Service_MIC, "(STUBBED) called, mic_power=%u", mic_power); 207 LOG_WARNING(Service_MIC, "(STUBBED) called, mic_power=%u", mic_power);
208} 208}
@@ -252,7 +252,7 @@ static void SetIirFilterMic(Interface* self) {
252 */ 252 */
253static void SetClamp(Interface* self) { 253static void SetClamp(Interface* self) {
254 u32* cmd_buff = Kernel::GetCommandBuffer(); 254 u32* cmd_buff = Kernel::GetCommandBuffer();
255 clamp = static_cast<bool>(cmd_buff[1] & 0xFF); 255 clamp = (cmd_buff[1] & 0xFF) != 0;
256 cmd_buff[1] = RESULT_SUCCESS.raw; // No error 256 cmd_buff[1] = RESULT_SUCCESS.raw; // No error
257 LOG_WARNING(Service_MIC, "(STUBBED) called, clamp=%u", clamp); 257 LOG_WARNING(Service_MIC, "(STUBBED) called, clamp=%u", clamp);
258} 258}
@@ -282,7 +282,7 @@ static void GetClamp(Interface* self) {
282 */ 282 */
283static void SetAllowShellClosed(Interface* self) { 283static void SetAllowShellClosed(Interface* self) {
284 u32* cmd_buff = Kernel::GetCommandBuffer(); 284 u32* cmd_buff = Kernel::GetCommandBuffer();
285 allow_shell_closed = static_cast<bool>(cmd_buff[1] & 0xFF); 285 allow_shell_closed = (cmd_buff[1] & 0xFF) != 0;
286 cmd_buff[1] = RESULT_SUCCESS.raw; // No error 286 cmd_buff[1] = RESULT_SUCCESS.raw; // No error
287 LOG_WARNING(Service_MIC, "(STUBBED) called, allow_shell_closed=%u", allow_shell_closed); 287 LOG_WARNING(Service_MIC, "(STUBBED) called, allow_shell_closed=%u", allow_shell_closed);
288} 288}
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
748 748
749 // Adjust the source rectangle to take into account parts of the input lines being cropped 749 // Adjust the source rectangle to take into account parts of the input lines being cropped
750 if (config.input_width > config.output_width) { 750 if (config.input_width > config.output_width) {
751 src_rect.right -= (config.input_width - config.output_width) * src_surface->res_scale_width; 751 src_rect.right -= static_cast<int>((config.input_width - config.output_width) *
752 src_surface->res_scale_width);
752 } 753 }
753 754
754 // Require destination surface to have same resolution scale as source to preserve scaling 755 // 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 {
76 } 76 }
77 77
78 state.fog_mode = regs.fog_mode; 78 state.fog_mode = regs.fog_mode;
79 state.fog_flip = regs.fog_flip; 79 state.fog_flip = regs.fog_flip != 0;
80 80
81 state.combiner_buffer_input = regs.tev_combiner_buffer_input.update_mask_rgb.Value() | 81 state.combiner_buffer_input = regs.tev_combiner_buffer_input.update_mask_rgb.Value() |
82 regs.tev_combiner_buffer_input.update_mask_a.Value() << 4; 82 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
118 // Setup input register table 118 // Setup input register table
119 const auto& attribute_register_map = config.input_register_map; 119 const auto& attribute_register_map = config.input_register_map;
120 120
121 for (unsigned i = 0; i < num_attributes; i++) 121 for (int i = 0; i < num_attributes; i++)
122 state.registers.input[attribute_register_map.GetRegisterForAttribute(i)] = input.attr[i]; 122 state.registers.input[attribute_register_map.GetRegisterForAttribute(i)] = input.attr[i];
123 123
124 state.conditional_code[0] = false; 124 state.conditional_code[0] = false;
@@ -146,7 +146,7 @@ DebugData<true> ShaderSetup::ProduceDebugInfo(const InputVertex& input, int num_
146 // Setup input register table 146 // Setup input register table
147 boost::fill(state.registers.input, Math::Vec4<float24>::AssignToAll(float24::Zero())); 147 boost::fill(state.registers.input, Math::Vec4<float24>::AssignToAll(float24::Zero()));
148 const auto& attribute_register_map = config.input_register_map; 148 const auto& attribute_register_map = config.input_register_map;
149 for (unsigned i = 0; i < num_attributes; i++) 149 for (int i = 0; i < num_attributes; i++)
150 state.registers.input[attribute_register_map.GetRegisterForAttribute(i)] = input.attr[i]; 150 state.registers.input[attribute_register_map.GetRegisterForAttribute(i)] = input.attr[i];
151 151
152 state.conditional_code[0] = false; 152 state.conditional_code[0] = false;