change resolution, macos needs more tests

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-05-24 22:50:53 +08:00
parent 0d11a88dce
commit b36a3f70fb
4 changed files with 22 additions and 15 deletions

View File

@@ -830,7 +830,7 @@ pub fn current_resolution(name: &str) -> ResultType<Resolution> {
bail!("Failed to find current resolution for {}", name);
}
pub fn change_resolution(name: &str, width: usize, height: usize) -> ResultType<()> {
pub fn change_resolution_directly(name: &str, width: usize, height: usize) -> ResultType<()> {
Command::new("xrandr")
.args(vec![
"--output",