SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit e79f2c1764a4010d7845c6656b03acc21be166bb parent 9c13590f30996b4fd827d7239ed19202f0883ac4 Author: Lior Halphon <LIJI32@gmail.com> Date: Sun, 21 Jan 2024 13:46:51 +0200 Add a menu item to reload the ROM without resetting Diffstat:
| M | Cocoa/Document.m | 14 | ++++++++++++++ |
| M | Cocoa/MainMenu.xib | 5 | +++++ |
2 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/Cocoa/Document.m b/Cocoa/Document.m @@ -2697,6 +2697,20 @@ enum GBWindowResizeAction }]; } +- (IBAction)reloadROM:(id)sender +{ + bool wasRunning = _running; + if (wasRunning) { + [self stop]; + } + + [self loadROM]; + + if (wasRunning) { + [self start]; + } +} + - (void)updateDebuggerButtons { bool updateContinue = false; diff --git a/Cocoa/MainMenu.xib b/Cocoa/MainMenu.xib @@ -208,6 +208,11 @@ <action selector="reset:" target="-1" id="VV1-VP-L7g"/> </connections> </menuItem> + <menuItem title="Reload ROM" alternate="YES" keyEquivalent="R" id="eQP-Fb-nkz"> + <connections> + <action selector="reloadROM:" target="-1" id="BpN-8V-Csg"/> + </connections> + </menuItem> <menuItem title="Pause" keyEquivalent="p" id="4K4-hw-R7Q"> <connections> <action selector="togglePause:" target="-1" id="osW-wt-QAa"/>
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.