Disable emulation options when game is not running
This commit is contained in:
+4
-3
@@ -357,14 +357,15 @@ impl ApplicationHandler for App {
|
||||
}
|
||||
});
|
||||
ui.menu("Emulation", || {
|
||||
let has_game = self.client.has_game();
|
||||
if self.client.is_running() {
|
||||
if ui.menu_item("Pause") {
|
||||
if ui.menu_item_config("Pause").enabled(has_game).build() {
|
||||
self.client.send_command(EmulatorCommand::Pause);
|
||||
}
|
||||
} else if ui.menu_item("Resume") {
|
||||
} else if ui.menu_item_config("Resume").enabled(has_game).build() {
|
||||
self.client.send_command(EmulatorCommand::Resume);
|
||||
}
|
||||
if ui.menu_item("Reset") {
|
||||
if ui.menu_item_config("Reset").enabled(has_game).build() {
|
||||
self.client.send_command(EmulatorCommand::Reset);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user