GBA Cheats: Fix issues detecting unencrypted cheats (fixes #2724)

This commit is contained in:
Vicki Pfau 2022-12-22 16:02:12 -08:00
parent 86bcbf1716
commit 1b9671bf21
2 changed files with 3 additions and 2 deletions

View File

@ -15,6 +15,7 @@ Emulation fixes:
- GBA Video: Disable BG target 1 blending when OBJ blending (fixes mgba.io/i/2722) - GBA Video: Disable BG target 1 blending when OBJ blending (fixes mgba.io/i/2722)
Other fixes: Other fixes:
- GBA: Fix forceskip BIOS logic for multiboot ROMs (fixes mgba.io/i/2753) - GBA: Fix forceskip BIOS logic for multiboot ROMs (fixes mgba.io/i/2753)
- GBA Cheats: Fix issues detecting unencrypted cheats (fixes mgba.io/i/2724)
- Qt: Manually split filename to avoid overzealous splitting (fixes mgba.io/i/2681) - Qt: Manually split filename to avoid overzealous splitting (fixes mgba.io/i/2681)
- Qt: Expand criteria for tag branch names (fixes mgba.io/i/2679) - Qt: Expand criteria for tag branch names (fixes mgba.io/i/2679)
- Qt: Fix scanning specific e-Reader dotcodes (fixes mgba.io/i/2693) - Qt: Fix scanning specific e-Reader dotcodes (fixes mgba.io/i/2693)

View File

@ -126,13 +126,13 @@ static bool GBACheatAddAutodetect(struct GBACheatSet* set, uint32_t op1, uint32_
GBACheatSetGameSharkVersion(set, GBA_GS_PARV3); GBACheatSetGameSharkVersion(set, GBA_GS_PARV3);
} }
rgsaP = GBACheatGameSharkProbability(op1, op1); rgsaP = GBACheatGameSharkProbability(op1, op2);
if (rgsaP > maxProbability) { if (rgsaP > maxProbability) {
maxProbability = rgsaP; maxProbability = rgsaP;
GBACheatSetGameSharkVersion(set, GBA_GS_GSAV1_RAW); GBACheatSetGameSharkVersion(set, GBA_GS_GSAV1_RAW);
} }
rparP = GBACheatProActionReplayProbability(op1, op1); rparP = GBACheatProActionReplayProbability(op1, op2);
if (rparP > maxProbability) { if (rparP > maxProbability) {
maxProbability = rparP; maxProbability = rparP;
GBACheatSetGameSharkVersion(set, GBA_GS_PARV3_RAW); GBACheatSetGameSharkVersion(set, GBA_GS_PARV3_RAW);