MCPcopy Create free account
hub / github.com/Recordscript/recordscript / select_screen

Function select_screen

src-tauri/src/main.rs:101–108  ·  view source on GitHub ↗
(selected_device: State<'_, SelectedDevice>, device_name: String)

Source from the content-addressed store, hash-verified

99
100#[tauri::command]
101fn select_screen(selected_device: State<'_, SelectedDevice>, device_name: String) {
102 let device = recorder::list_screen().unwrap().into_iter()
103 .find(|device| device.name() == device_name).unwrap();
104
105 println!("Switching screen to {device_name:?}");
106
107 selected_device.lock().unwrap().screen = device;
108}
109
110#[tauri::command]
111fn preview_screen(device_name: String) -> String {

Callers

nothing calls this directly

Calls 2

list_screenFunction · 0.70
nameMethod · 0.45

Tested by

no test coverage detected