From 3ad378cafc5743eb2bd95865b7de42b6e9266d56 Mon Sep 17 00:00:00 2001 From: lifegpc Date: Wed, 8 Oct 2025 16:30:06 +0800 Subject: [PATCH] Fix softpal pgd decode bug --- src/scripts/softpal/img/pgd/base.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scripts/softpal/img/pgd/base.rs b/src/scripts/softpal/img/pgd/base.rs index af51095..fa61c48 100644 --- a/src/scripts/softpal/img/pgd/base.rs +++ b/src/scripts/softpal/img/pgd/base.rs @@ -207,9 +207,9 @@ impl PgdReader { let mut offset = points[i] as usize; let base_value = (input[src2 + offset] as i32) << 7; offset = dst + 3 * offset; - output[offset] = Self::clamp(base_value + b); - output[offset + 1] = Self::clamp(base_value + g); - output[offset + 2] = Self::clamp(base_value + r); + output[offset] = Self::clamp((base_value + b) >> 7); + output[offset + 1] = Self::clamp((base_value + g) >> 7); + output[offset + 2] = Self::clamp((base_value + r) >> 7); } src2 += 2; dst += 6;