Support manual/automatic ROM reloading
This commit is contained in:
@@ -85,6 +85,10 @@ impl GameWindow {
|
||||
.send_command(EmulatorCommand::LoadGame(self.sim_id, path));
|
||||
}
|
||||
}
|
||||
Command::ReloadRom => {
|
||||
self.client
|
||||
.send_command(EmulatorCommand::ReloadRom(self.sim_id));
|
||||
}
|
||||
Command::Quit => {
|
||||
let _ = self.proxy.send_event(UserEvent::Quit(self.sim_id));
|
||||
}
|
||||
@@ -137,6 +141,18 @@ impl GameWindow {
|
||||
.send_command(EmulatorCommand::LoadGame(self.sim_id, path));
|
||||
}
|
||||
}
|
||||
if ui
|
||||
.add(self.button_for(ui.ctx(), "Reload ROM", Command::ReloadRom))
|
||||
.clicked()
|
||||
{
|
||||
self.client
|
||||
.send_command(EmulatorCommand::ReloadRom(self.sim_id));
|
||||
}
|
||||
let watch_rom = self.client.is_rom_watched(self.sim_id);
|
||||
if ui.selectable_button(watch_rom, "Watch ROM").clicked() {
|
||||
self.client
|
||||
.send_command(EmulatorCommand::WatchRom(self.sim_id, !watch_rom));
|
||||
}
|
||||
if ui
|
||||
.add(self.button_for(ui.ctx(), "Quit", Command::Quit))
|
||||
.clicked()
|
||||
|
||||
Reference in New Issue
Block a user