mirror of
https://github.com/citra-emu/citra-canary.git
synced 2024-12-26 01:15:31 +00:00
Get rid of narrowing conversion warning
This commit is contained in:
parent
aee8bf680c
commit
84054b7cd8
|
@ -376,8 +376,9 @@ static void ProcessTriangleInternal(const Vertex& v0, const Vertex& v1, const Ve
|
||||||
|
|
||||||
if (use_border_s || use_border_t) {
|
if (use_border_s || use_border_t) {
|
||||||
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.a};
|
static_cast<u8>(border_color.r), static_cast<u8>(border_color.g),
|
||||||
|
static_cast<u8>(border_color.b), static_cast<u8>(border_color.a)};
|
||||||
} else {
|
} else {
|
||||||
// Textures are laid out from bottom to top, hence we invert the t coordinate.
|
// Textures are laid out from bottom to top, hence we invert the t coordinate.
|
||||||
// NOTE: This may not be the right place for the inversion.
|
// NOTE: This may not be the right place for the inversion.
|
||||||
|
@ -415,10 +416,10 @@ static void ProcessTriangleInternal(const Vertex& v0, const Vertex& v1, const Ve
|
||||||
Math::Vec4<u8> combiner_output;
|
Math::Vec4<u8> combiner_output;
|
||||||
Math::Vec4<u8> combiner_buffer = {0, 0, 0, 0};
|
Math::Vec4<u8> combiner_buffer = {0, 0, 0, 0};
|
||||||
Math::Vec4<u8> next_combiner_buffer = {
|
Math::Vec4<u8> next_combiner_buffer = {
|
||||||
regs.texturing.tev_combiner_buffer_color.r,
|
static_cast<u8>(regs.texturing.tev_combiner_buffer_color.r),
|
||||||
regs.texturing.tev_combiner_buffer_color.g,
|
static_cast<u8>(regs.texturing.tev_combiner_buffer_color.g),
|
||||||
regs.texturing.tev_combiner_buffer_color.b,
|
static_cast<u8>(regs.texturing.tev_combiner_buffer_color.b),
|
||||||
regs.texturing.tev_combiner_buffer_color.a,
|
static_cast<u8>(regs.texturing.tev_combiner_buffer_color.a),
|
||||||
};
|
};
|
||||||
|
|
||||||
Math::Vec4<u8> primary_fragment_color = {0, 0, 0, 0};
|
Math::Vec4<u8> primary_fragment_color = {0, 0, 0, 0};
|
||||||
|
@ -473,8 +474,9 @@ static void ProcessTriangleInternal(const Vertex& v0, const Vertex& v1, const Ve
|
||||||
return combiner_buffer;
|
return combiner_buffer;
|
||||||
|
|
||||||
case Source::Constant:
|
case Source::Constant:
|
||||||
return {tev_stage.const_r, tev_stage.const_g, tev_stage.const_b,
|
return {
|
||||||
tev_stage.const_a};
|
static_cast<u8>(tev_stage.const_r), static_cast<u8>(tev_stage.const_g),
|
||||||
|
static_cast<u8>(tev_stage.const_b), static_cast<u8>(tev_stage.const_a)};
|
||||||
|
|
||||||
case Source::Previous:
|
case Source::Previous:
|
||||||
return combiner_output;
|
return combiner_output;
|
||||||
|
|
Loading…
Reference in a new issue