mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-23 21:20:05 +00:00
Build: Fixed a few warnings.
This commit is contained in:
parent
3174bfd50c
commit
aea9a91100
@ -49,7 +49,7 @@ static bool circle_pad_right = false;
|
|||||||
static bool circle_pad_modifier = false;
|
static bool circle_pad_modifier = false;
|
||||||
|
|
||||||
static void UpdateCirclePad(EmuWindow& emu_window) {
|
static void UpdateCirclePad(EmuWindow& emu_window) {
|
||||||
constexpr float SQRT_HALF = 0.707106781;
|
constexpr float SQRT_HALF = 0.707106781f;
|
||||||
int x = 0, y = 0;
|
int x = 0, y = 0;
|
||||||
|
|
||||||
if (circle_pad_right)
|
if (circle_pad_right)
|
||||||
@ -61,9 +61,9 @@ static void UpdateCirclePad(EmuWindow& emu_window) {
|
|||||||
if (circle_pad_down)
|
if (circle_pad_down)
|
||||||
--y;
|
--y;
|
||||||
|
|
||||||
float modifier = circle_pad_modifier ? Settings::values.pad_circle_modifier_scale : 1.0;
|
float modifier = circle_pad_modifier ? Settings::values.pad_circle_modifier_scale : 1.0f;
|
||||||
emu_window.CirclePadUpdated(x * modifier * (y == 0 ? 1.0 : SQRT_HALF),
|
emu_window.CirclePadUpdated(x * modifier * (y == 0 ? 1.0f : SQRT_HALF),
|
||||||
y * modifier * (x == 0 ? 1.0 : SQRT_HALF));
|
y * modifier * (x == 0 ? 1.0f : SQRT_HALF));
|
||||||
}
|
}
|
||||||
|
|
||||||
int NewDeviceId() {
|
int NewDeviceId() {
|
||||||
|
@ -562,9 +562,9 @@ static void ProcessTriangleInternal(const Shader::OutputVertex& v0, const Shader
|
|||||||
};
|
};
|
||||||
|
|
||||||
if ((texture.config.wrap_s == Regs::TextureConfig::ClampToBorder &&
|
if ((texture.config.wrap_s == Regs::TextureConfig::ClampToBorder &&
|
||||||
(s < 0 || s >= texture.config.width)) ||
|
(s < 0 || static_cast<u32>(s) >= texture.config.width)) ||
|
||||||
(texture.config.wrap_t == Regs::TextureConfig::ClampToBorder &&
|
(texture.config.wrap_t == Regs::TextureConfig::ClampToBorder &&
|
||||||
(t < 0 || t >= texture.config.height))) {
|
(t < 0 || static_cast<u32>(t) >= texture.config.height))) {
|
||||||
auto border_color = texture.config.border_color;
|
auto border_color = texture.config.border_color;
|
||||||
texture_color[i] = {border_color.r, border_color.g, border_color.b,
|
texture_color[i] = {border_color.r, border_color.g, border_color.b,
|
||||||
border_color.a};
|
border_color.a};
|
||||||
@ -947,7 +947,7 @@ static void ProcessTriangleInternal(const Shader::OutputVertex& v0, const Shader
|
|||||||
// Blend the fog
|
// Blend the fog
|
||||||
for (unsigned i = 0; i < 3; i++) {
|
for (unsigned i = 0; i < 3; i++) {
|
||||||
combiner_output[i] =
|
combiner_output[i] =
|
||||||
fog_factor * combiner_output[i] + (1.0f - fog_factor) * fog_color[i];
|
static_cast<u8>(fog_factor * combiner_output[i] + (1.0f - fog_factor) * fog_color[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,12 +213,12 @@ void RasterizerOpenGL::DrawTriangles() {
|
|||||||
|
|
||||||
// Scissor checks are window-, not viewport-relative, which means that if the cached texture
|
// Scissor checks are window-, not viewport-relative, which means that if the cached texture
|
||||||
// sub-rect changes, the scissor bounds also need to be updated.
|
// sub-rect changes, the scissor bounds also need to be updated.
|
||||||
GLint scissor_x1 = rect.left + regs.scissor_test.x1 * color_surface->res_scale_width;
|
GLint scissor_x1 = static_cast<GLint>(rect.left + regs.scissor_test.x1 * color_surface->res_scale_width);
|
||||||
GLint scissor_y1 = rect.bottom + regs.scissor_test.y1 * color_surface->res_scale_height;
|
GLint scissor_y1 = static_cast<GLint>(rect.bottom + regs.scissor_test.y1 * color_surface->res_scale_height);
|
||||||
// x2, y2 have +1 added to cover the entire pixel area, otherwise you might get cracks when
|
// x2, y2 have +1 added to cover the entire pixel area, otherwise you might get cracks when
|
||||||
// scaling or doing multisampling.
|
// scaling or doing multisampling.
|
||||||
GLint scissor_x2 = rect.left + (regs.scissor_test.x2 + 1) * color_surface->res_scale_width;
|
GLint scissor_x2 = static_cast<GLint>(rect.left + (regs.scissor_test.x2 + 1) * color_surface->res_scale_width);
|
||||||
GLint scissor_y2 = rect.bottom + (regs.scissor_test.y2 + 1) * color_surface->res_scale_height;
|
GLint scissor_y2 = static_cast<GLint>(rect.bottom + (regs.scissor_test.y2 + 1) * color_surface->res_scale_height);
|
||||||
|
|
||||||
if (uniform_block_data.data.scissor_x1 != scissor_x1 ||
|
if (uniform_block_data.data.scissor_x1 != scissor_x1 ||
|
||||||
uniform_block_data.data.scissor_x2 != scissor_x2 ||
|
uniform_block_data.data.scissor_x2 != scissor_x2 ||
|
||||||
|
Loading…
Reference in New Issue
Block a user