git.y1.nz

SameBoy

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

commit 82d3ffdd9fff2111cb063a6bb4282f980943bbcf
parent 71b485ccd0685eb67fdeee1826a4d47a1bcb8c50
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Fri, 14 Nov 2025 22:56:33 +0200

Don't try to borrow a border if no ROM is loaded

Diffstat:
MCore/gb.c2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Core/gb.c b/Core/gb.c @@ -279,7 +279,7 @@ void GB_borrow_sgb_border(GB_gameboy_t *gb) if (gb->border_mode != GB_BORDER_ALWAYS) return; if (gb->tried_loading_sgb_border) return; gb->tried_loading_sgb_border = true; - if (gb->rom && gb->rom[0x146] != 3) return; // Not an SGB game, nothing to borrow + if (!gb->rom || gb->rom[0x146] != 3) return; // Not an SGB game, nothing to borrow if (!gb->boot_rom_load_callback) return; // Can't borrow a border without this callback GB_gameboy_t sgb; GB_init(&sgb, GB_MODEL_SGB);

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