change resolution, macos needs more tests

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

No files matched your search

+1 -1
View File
@@ -658,7 +658,7 @@ pub fn current_resolution(name: &str) -> ResultType<Resolution> {
}
}
pub fn change_resolution(name: &str, width: usize, height: usize) -> ResultType<()> {
pub fn change_resolution_directly(name: &str, width: usize, height: usize) -> ResultType<()> {
let display = name.parse::<u32>().map_err(|e| anyhow!(e))?;
unsafe {
if NO == MacSetMode(display, width as _, height as _) {