MCPcopy Create free account
hub / github.com/RIP-Comm/clementine / set_enabled

Method set_enabled

ui/src/disassembler.rs:71–79  ·  view source on GitHub ↗

Enable instruction pushing while the window is open, disable it when closed, so the CPU hot path skips the per-instruction work otherwise.

(&mut self, enabled: bool)

Source from the content-addressed store, hash-verified

69
70 /// Enable instruction pushing while the window is open, disable it when
71 /// closed, so the CPU hot path skips the per-instruction work otherwise.
72 fn set_enabled(&mut self, enabled: bool) {
73 if self.enabled == enabled {
74 return;
75 }
76 if let Ok(mut handle) = self.emu_handle.lock()
77 && handle.send(EmuCommand::SetDisasmEnabled(enabled))
78 {
79 self.enabled = enabled;
80 }
81 }
82

Callers 1

showMethod · 0.80

Calls 1

sendMethod · 0.45

Tested by

no test coverage detected