GBA e-Reader: Use LED duration register
Vicki Pfau vi@endrift.com
Sun, 23 Feb 2020 16:22:58 -0800
1 files changed,
4 insertions(+),
1 deletions(-)
jump to
M
src/gba/ereader.c
→
src/gba/ereader.c
@@ -572,7 +572,10 @@ }
} hw->eReaderRegisterControl1 = EReaderControl1FillScanline(hw->eReaderRegisterControl1); if (EReaderControl0IsLedEnable(hw->eReaderRegisterControl0)) { - uint16_t led = 2754; // TODO: Figure out why this breaks if using the LED register + uint16_t led = hw->eReaderRegisterLed * 2; + if (led > 0x4000) { + led = 0x4000; + } GBARaiseIRQ(hw->p, IRQ_GAMEPAK, -led); } }