mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-21 20:21:29 +02:00
@@ -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;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user