debug restore resolutions

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-06-05 19:50:24 +08:00
parent e670989e0f
commit 3c2bf2c154
4 changed files with 23 additions and 13 deletions

View File

@@ -1591,12 +1591,13 @@ impl LoginConfigHandler {
pub fn get_custom_resolution(&self, display: i32) -> Option<(i32, i32)> {
self.config
.custom_resolutions
.get(&display)
.get(&display.to_string())
.map(|r| (r.w, r.h))
}
#[inline]
pub fn set_custom_resolution(&mut self, display: i32, wh: Option<(i32, i32)>) {
let display = display.to_string();
let mut config = self.load_config();
match wh {
Some((w, h)) => {