Skip to content

Commit

Permalink
Add a menu item to reload the ROM without resetting
Browse files Browse the repository at this point in the history
  • Loading branch information
LIJI32 committed Jan 21, 2024
1 parent 9c13590 commit e79f2c1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Cocoa/Document.m
Original file line number Diff line number Diff line change
Expand Up @@ -2697,6 +2697,20 @@ - (IBAction)cartSwap:(id)sender
}];
}

- (IBAction)reloadROM:(id)sender
{
bool wasRunning = _running;
if (wasRunning) {
[self stop];
}

[self loadROM];

if (wasRunning) {
[self start];
}
}

- (void)updateDebuggerButtons
{
bool updateContinue = false;
Expand Down
5 changes: 5 additions & 0 deletions Cocoa/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>
Expand Down

0 comments on commit e79f2c1

Please sign in to comment.