mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Fix MBC3+TIMER + handle lack of BATTERY
`TIMER & BATTERY` is 0, but even `|` would only be checking if *either* is set; instead, imply BATTERY as soon as TIMER is given, printing a warning if it was not given.
This commit is contained in:
@@ -494,7 +494,9 @@ do { \
|
||||
|
||||
case MBC3:
|
||||
// Handle timer, which also requires battery
|
||||
if (features & (TIMER & BATTERY)) {
|
||||
if (features & TIMER) {
|
||||
if (!(features & BATTERY))
|
||||
fprintf(stderr, "warning: MBC3+TIMER implies BATTERY\n");
|
||||
features &= ~(TIMER | BATTERY); // Reset those bits
|
||||
mbc = MBC3_TIMER_BATTERY;
|
||||
// RAM is handled below
|
||||
|
||||
Reference in New Issue
Block a user