From f69f92b93850f7bd7dae54f026152d3ba239e1ce Mon Sep 17 00:00:00 2001 From: Lephe Date: Sun, 22 May 2022 20:00:22 +0100 Subject: [PATCH] cpg: fix parameter check minding CS3 on the fx-CG 10/20 --- src/cpg/overclock.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cpg/overclock.c b/src/cpg/overclock.c index 865d6f8..24ab66b 100644 --- a/src/cpg/overclock.c +++ b/src/cpg/overclock.c @@ -216,16 +216,17 @@ int clock_get_speed(void) for(int i = 0; i < 5; i++) { struct cpg_overclock_setting *s = &settings[i]; + bool cg20 = (gint[HWCALC] == HWCALC_PRIZM); if(CPG.FLLFRQ.lword == s->FLLFRQ && CPG.FRQCR.lword == s->FRQCR && BSC.CS0BCR.lword == s->CS0BCR && BSC.CS2BCR.lword == s->CS2BCR - && BSC.CS3BCR.lword == s->CS3BCR + && (BSC.CS3BCR.lword == s->CS3BCR || cg20) && BSC.CS5ABCR.lword == s->CS5aBCR && BSC.CS0WCR.lword == s->CS0WCR && BSC.CS2WCR.lword == s->CS2WCR - && BSC.CS3WCR.lword == s->CS3WCR + && (BSC.CS3WCR.lword == s->CS3WCR || cg20) && BSC.CS5AWCR.lword == s->CS5aWCR) return CLOCK_SPEED_F1 + i; }