git.y1.nz

SameBoy

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

commit f769eff1d959e0d1dce07eccd727ee4e68d4b518
parent be21741db3a2e30afe7cce18bfe99e07a5ea83e7
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Wed, 24 Sep 2025 18:18:42 +0300

Pressing buttons in Rewind should now cancel rewind mode

Diffstat:
MiOS/GBBackgroundView.m7+++++++
MiOS/GBViewController.m14++++++++++++++
2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/iOS/GBBackgroundView.m b/iOS/GBBackgroundView.m @@ -450,6 +450,13 @@ static GB_key_mask_t angleToKeyMask(double angle) [[GBHapticManager sharedManager] doTapHaptic]; } _lastMask = mask; + + GBViewController *viewController = self.viewController; + GBRunMode runMode = viewController.runMode; + if (runMode == GBRunModeRewind || runMode == GBRunModePaused) { + viewController.runMode = GBRunModeNormal; + [self fadeOverlayOut]; + } } } diff --git a/iOS/GBViewController.m b/iOS/GBViewController.m @@ -697,6 +697,10 @@ static void rumbleCallback(GB_gameboy_t *gb, double amp) case GBSelect: case GBStart: GB_set_key_state(&_gb, (GB_key_t)gbButton, button.value > 0.25); + if (_runMode == GBRunModeRewind || _runMode == GBRunModePaused) { + self.runMode = GBRunModeNormal; + [_backgroundView fadeOverlayOut]; + } break; case GBRapidA: _rapidA = button.value > 0.25; @@ -795,6 +799,10 @@ static void rumbleCallback(GB_gameboy_t *gb, double amp) GB_set_key_state(&_gb, GB_KEY_RIGHT, right); GB_set_key_state(&_gb, GB_KEY_UP, up); GB_set_key_state(&_gb, GB_KEY_DOWN, down); + if (_runMode == GBRunModeRewind || _runMode == GBRunModePaused) { + self.runMode = GBRunModeNormal; + [_backgroundView fadeOverlayOut]; + } } - (void)controller:(GCController *)controller motionChanged:(GCMotion *)motion @@ -1649,6 +1657,12 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response _rapidBCount++; GB_set_key_state(&_gb, GB_KEY_B, !(_rapidBCount & 2)); } + if (_rapidA || _rapidB) { + if (_runMode == GBRunModeRewind || _runMode == GBRunModePaused) { + self.runMode = GBRunModeNormal; + [_backgroundView fadeOverlayOut]; + } + } _rewind = _runMode == GBRunModeRewind; }

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