Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GBA default RTC hardware #3069

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/gba/overrides.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,23 @@ void GBAOverrideApplyDefaults(struct GBA* gba, const struct Configuration* overr
GBAOverrideApply(gba, &override);
} else if (GBAOverrideFind(overrides, &override)) {
GBAOverrideApply(gba, &override);
} else {
// Apply Everdrive UTTD save detection
switch (override.id[0]) {
case '1':
override.savetype = SAVEDATA_EEPROM;
break;
case '2':
override.savetype = SAVEDATA_SRAM;
break;
case '3':
override.savetype = SAVEDATA_FLASH512;
break;
case '4':
override.savetype = SAVEDATA_FLASH1M;
break;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend a default: return; here so it doesn't call GBAOverrideApply if it's not one of those four, but otherwise looks good.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah actually it's not compiling in the CI. I might have changed the constants to start with GBA_* in the meantime.

}
GBAOverrideApply(gba, &override);
}
}
}