mirror of https://github.com/bsnes-emu/bsnes.git
parent
b9ccb90324
commit
c2c479440e
|
@ -151,6 +151,10 @@ auto InputManager::bindHotkeys() -> void {
|
||||||
program.reset();
|
program.reset();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
hotkeys.append(InputHotkey("Power Cycle").onPress([] {
|
||||||
|
program.power();
|
||||||
|
}));
|
||||||
|
|
||||||
hotkeys.append(InputHotkey("Quit Emulator").onPress([] {
|
hotkeys.append(InputHotkey("Quit Emulator").onPress([] {
|
||||||
program.quit();
|
program.quit();
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -308,6 +308,14 @@ auto Program::reset() -> void {
|
||||||
showMessage("Game reset");
|
showMessage("Game reset");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto Program::power() -> void {
|
||||||
|
if(!emulator->loaded()) return;
|
||||||
|
rewindReset();
|
||||||
|
hackCompatibility();
|
||||||
|
emulator->power();
|
||||||
|
showMessage("Power cycle");
|
||||||
|
}
|
||||||
|
|
||||||
auto Program::unload() -> void {
|
auto Program::unload() -> void {
|
||||||
if(!emulator->loaded()) return;
|
if(!emulator->loaded()) return;
|
||||||
//todo: video.clear() is not working on macOS/OpenGL 3.2
|
//todo: video.clear() is not working on macOS/OpenGL 3.2
|
||||||
|
|
|
@ -24,6 +24,7 @@ struct Program : Lock, Emulator::Platform {
|
||||||
auto loadSufamiTurboB(string location) -> bool;
|
auto loadSufamiTurboB(string location) -> bool;
|
||||||
auto save() -> void;
|
auto save() -> void;
|
||||||
auto reset() -> void;
|
auto reset() -> void;
|
||||||
|
auto power() -> void;
|
||||||
auto unload() -> void;
|
auto unload() -> void;
|
||||||
auto verified() const -> bool;
|
auto verified() const -> bool;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue