cpg: fix parameter check minding CS3 on the fx-CG 10/20

This commit is contained in:
Lephe 2022-05-22 20:00:22 +01:00
parent 8c9c48a91e
commit f69f92b938
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 3 additions and 2 deletions

View File

@ -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;
}