mirror of
https://github.com/AkiChase/scrcpy-mask
synced 2025-04-21 04:25:13 +08:00
feat: adb restart
This commit is contained in:
parent
ee5862412b
commit
2573356b8c
@ -19,6 +19,14 @@ pub fn adb_devices() -> Result<Vec<Device>, String> {
|
||||
}
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn adb_restart_server() -> Result<(), String> {
|
||||
match ScrcpyClient::adb_restart_server() {
|
||||
Ok(_) => Ok(()),
|
||||
Err(e) => Err(e.to_string()),
|
||||
}
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
/// forward local port to the device port
|
||||
pub fn forward_server_port(id: String, scid: String, port: u16) -> Result<(), String> {
|
||||
|
@ -30,6 +30,7 @@ async fn main() {
|
||||
})
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
command::adb_devices,
|
||||
command::adb_restart_server,
|
||||
command::forward_server_port,
|
||||
command::push_server_file,
|
||||
command::start_scrcpy_server,
|
||||
|
Loading…
Reference in New Issue
Block a user