From e6fa8cd74bbe527edb750be1f19659a7d1a24668 Mon Sep 17 00:00:00 2001 From: Zephyron Date: Sun, 21 Sep 2025 14:33:54 +1000 Subject: [PATCH] Fix conversion warning in gl_zbc_clear.cpp Add explicit static_cast to RGBA component extraction to resolve -Werror=conversion compiler error. The bit operations return unsigned int but need to be assigned to u8 type. --- src/video_core/renderer_opengl/gl_zbc_clear.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/video_core/renderer_opengl/gl_zbc_clear.cpp b/src/video_core/renderer_opengl/gl_zbc_clear.cpp index eb91e05b1..f7be08c4f 100644 --- a/src/video_core/renderer_opengl/gl_zbc_clear.cpp +++ b/src/video_core/renderer_opengl/gl_zbc_clear.cpp @@ -84,10 +84,10 @@ std::array ZBCClear::ConvertColorToOpenGL(const std::array& colo const u32 primary_color = color_u32[0]; // Extract RGBA components (assuming RGBA8888 format) - const u8 r = (primary_color >> 0) & 0xFF; - const u8 g = (primary_color >> 8) & 0xFF; - const u8 b = (primary_color >> 16) & 0xFF; - const u8 a = (primary_color >> 24) & 0xFF; + const u8 r = static_cast((primary_color >> 0) & 0xFF); + const u8 g = static_cast((primary_color >> 8) & 0xFF); + const u8 b = static_cast((primary_color >> 16) & 0xFF); + const u8 a = static_cast((primary_color >> 24) & 0xFF); // Convert to normalized float values [0.0, 1.0] color_f32[0] = static_cast(r) / 255.0f; // Red