summaryrefslogtreecommitdiffstats
path: root/minui/graphics_overlay.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--minui/graphics_overlay.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/minui/graphics_overlay.cpp b/minui/graphics_overlay.cpp
index b7e62d945..5988d70ad 100644
--- a/minui/graphics_overlay.cpp
+++ b/minui/graphics_overlay.cpp
@@ -448,12 +448,10 @@ GRSurface* MinuiBackendOverlay::Flip() {
if (double_buffered) {
#if defined(RECOVERY_BGRA)
// In case of BGRA, do some byte swapping
- unsigned int idx;
- unsigned char tmp;
unsigned char* ucfb_vaddr = (unsigned char*)gr_draw->data;
- for (idx = 0 ; idx < (gr_draw->height * gr_draw->row_bytes);
+ for (int idx = 0 ; idx < (gr_draw->height * gr_draw->row_bytes);
idx += 4) {
- tmp = ucfb_vaddr[idx];
+ unsigned char tmp = ucfb_vaddr[idx];
ucfb_vaddr[idx ] = ucfb_vaddr[idx + 2];
ucfb_vaddr[idx + 2] = tmp;
}