Support manual/automatic ROM reloading
This commit is contained in:
+8
-1
@@ -460,6 +460,7 @@ struct PersistedGamepadMapping {
|
||||
#[derive(Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Hash)]
|
||||
pub enum Command {
|
||||
OpenRom,
|
||||
ReloadRom,
|
||||
Quit,
|
||||
FrameAdvance,
|
||||
FastForward(u32),
|
||||
@@ -470,9 +471,10 @@ pub enum Command {
|
||||
}
|
||||
|
||||
impl Command {
|
||||
pub fn all() -> [Self; 7] {
|
||||
pub fn all() -> [Self; 8] {
|
||||
[
|
||||
Self::OpenRom,
|
||||
Self::ReloadRom,
|
||||
Self::Quit,
|
||||
Self::PauseResume,
|
||||
Self::Reset,
|
||||
@@ -485,6 +487,7 @@ impl Command {
|
||||
pub fn name(self) -> &'static str {
|
||||
match self {
|
||||
Self::OpenRom => "Open ROM",
|
||||
Self::ReloadRom => "Reload ROM",
|
||||
Self::Quit => "Exit",
|
||||
Self::PauseResume => "Pause/Resume",
|
||||
Self::Reset => "Reset",
|
||||
@@ -516,6 +519,10 @@ impl Default for Shortcuts {
|
||||
Command::OpenRom,
|
||||
KeyboardShortcut::new(Modifiers::COMMAND, Key::O),
|
||||
);
|
||||
shortcuts.set(
|
||||
Command::ReloadRom,
|
||||
KeyboardShortcut::new(Modifiers::COMMAND | Modifiers::SHIFT, Key::F5),
|
||||
);
|
||||
shortcuts.set(
|
||||
Command::Quit,
|
||||
KeyboardShortcut::new(Modifiers::COMMAND, Key::Q),
|
||||
|
||||
Reference in New Issue
Block a user