mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-09-02 14:12:45 +02:00
Fix a bug causing newly imported ROMs to sometime incorrectly prefer SGB over CGB
This commit is contained in:
@@ -491,9 +491,11 @@ static void rumbleCallback(GB_gameboy_t *gb, double amp)
|
|||||||
// Newly played ROM, pick the best model
|
// Newly played ROM, pick the best model
|
||||||
uint8_t *rom = GB_get_direct_access(&_gb, GB_DIRECT_ACCESS_ROM, NULL, NULL);
|
uint8_t *rom = GB_get_direct_access(&_gb, GB_DIRECT_ACCESS_ROM, NULL, NULL);
|
||||||
|
|
||||||
if ((rom[0x143] & 0x80) && !GB_is_cgb(&_gb)) {
|
if ((rom[0x143] & 0x80)) {
|
||||||
|
if (!GB_is_cgb(&_gb)) {
|
||||||
GB_switch_model_and_reset(&_gb, [[NSUserDefaults standardUserDefaults] integerForKey:@"GBCGBModel"]);
|
GB_switch_model_and_reset(&_gb, [[NSUserDefaults standardUserDefaults] integerForKey:@"GBCGBModel"]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if ((rom[0x146] == 3) && !GB_is_sgb(&_gb)) {
|
else if ((rom[0x146] == 3) && !GB_is_sgb(&_gb)) {
|
||||||
GB_switch_model_and_reset(&_gb, [[NSUserDefaults standardUserDefaults] integerForKey:@"GBSGBModel"]);
|
GB_switch_model_and_reset(&_gb, [[NSUserDefaults standardUserDefaults] integerForKey:@"GBSGBModel"]);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user