Add a menu item to reload the ROM without resetting

This commit is contained in:
Lior Halphon
2024-01-21 13:46:51 +02:00
parent 9c13590f30
commit e79f2c1764
2 changed files with 19 additions and 0 deletions

View File

@@ -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 - (void)updateDebuggerButtons
{ {
bool updateContinue = false; bool updateContinue = false;

View File

@@ -208,6 +208,11 @@
<action selector="reset:" target="-1" id="VV1-VP-L7g"/> <action selector="reset:" target="-1" id="VV1-VP-L7g"/>
</connections> </connections>
</menuItem> </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"> <menuItem title="Pause" keyEquivalent="p" id="4K4-hw-R7Q">
<connections> <connections>
<action selector="togglePause:" target="-1" id="osW-wt-QAa"/> <action selector="togglePause:" target="-1" id="osW-wt-QAa"/>