Support screenshots
This commit is contained in:
+8
-1
@@ -471,11 +471,12 @@ pub enum Command {
|
||||
FastForward(u32),
|
||||
Reset,
|
||||
PauseResume,
|
||||
Screenshot,
|
||||
// if you update this, update Command::all and add a default
|
||||
}
|
||||
|
||||
impl Command {
|
||||
pub fn all() -> [Self; 6] {
|
||||
pub fn all() -> [Self; 7] {
|
||||
[
|
||||
Self::OpenRom,
|
||||
Self::Quit,
|
||||
@@ -483,6 +484,7 @@ impl Command {
|
||||
Self::Reset,
|
||||
Self::FrameAdvance,
|
||||
Self::FastForward(0),
|
||||
Self::Screenshot,
|
||||
]
|
||||
}
|
||||
|
||||
@@ -494,6 +496,7 @@ impl Command {
|
||||
Self::Reset => "Reset",
|
||||
Self::FrameAdvance => "Frame Advance",
|
||||
Self::FastForward(_) => "Fast Forward",
|
||||
Self::Screenshot => "Screenshot",
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -539,6 +542,10 @@ impl Default for Shortcuts {
|
||||
Command::FastForward(0),
|
||||
KeyboardShortcut::new(Modifiers::NONE, Key::Space),
|
||||
);
|
||||
shortcuts.set(
|
||||
Command::Screenshot,
|
||||
KeyboardShortcut::new(Modifiers::NONE, Key::F12),
|
||||
);
|
||||
shortcuts
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user