Revert "Remove manual adjustment of fps, automatically adjusted to the maximum already"

This commit is contained in:
RustDesk
2023-11-09 15:24:57 +08:00
committed by GitHub
parent ffdfef0adc
commit 94f2751902
6 changed files with 132 additions and 14 deletions

View File

@@ -1,7 +1,4 @@
use crate::{
common::{get_supported_keyboard_modes, is_keyboard_mode_supported},
input::{MOUSE_BUTTON_LEFT, MOUSE_TYPE_DOWN, MOUSE_TYPE_UP, MOUSE_TYPE_WHEEL},
};
use crate::{input::{MOUSE_BUTTON_LEFT, MOUSE_TYPE_DOWN, MOUSE_TYPE_UP, MOUSE_TYPE_WHEEL}, common::{is_keyboard_mode_supported, get_supported_keyboard_modes}};
use async_trait::async_trait;
use bytes::Bytes;
use rdev::{Event, EventType::*, KeyCode};
@@ -216,7 +213,7 @@ impl<T: InvokeUiSession> Session<T> {
self.lc.read().unwrap().version.clone()
}
pub fn fallback_keyboard_mode(&self) -> String {
pub fn fallback_keyboard_mode(&self) -> String {
let peer_version = self.get_peer_version();
let platform = self.peer_platform();
@@ -395,6 +392,11 @@ impl<T: InvokeUiSession> Session<T> {
}
}
pub fn set_custom_fps(&self, custom_fps: i32) {
let msg = self.lc.write().unwrap().set_custom_fps(custom_fps);
self.send(Data::Message(msg));
}
pub fn get_remember(&self) -> bool {
self.lc.read().unwrap().remember
}