git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

commit 2bf8feb299284aaef683eb9c395ca36ad9854aa8
parent e5e9cf145ab572f26d30ff0d49844a683b6d9557
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Mon, 27 May 2024 23:06:16 +0300

Fix a bug causing newly imported ROMs to sometime incorrectly prefer SGB over CGB

Diffstat:
MiOS/GBViewController.m4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/iOS/GBViewController.m b/iOS/GBViewController.m @@ -491,9 +491,11 @@ static void rumbleCallback(GB_gameboy_t *gb, double amp) // Newly played ROM, pick the best model 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"]); } + } else if ((rom[0x146] == 3) && !GB_is_sgb(&_gb)) { GB_switch_model_and_reset(&_gb, [[NSUserDefaults standardUserDefaults] integerForKey:@"GBSGBModel"]); }

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.