Set the default DPI awareness for Zed (#8936)

### Description

This is a part of #8809 


Release Notes:
- N/A
This commit is contained in:
Small White 2024-03-07 03:45:18 +08:00 committed by GitHub
parent 59faef5800
commit 8357039419
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 1 deletions

View file

@ -44,8 +44,17 @@ fn main() {
}
}
// todo!("windows"): This is to avoid stack overflow. Remove it when solved.
if std::env::var("CARGO_CFG_TARGET_ENV").ok() == Some("msvc".to_string()) {
// todo!("windows"): This is to avoid stack overflow. Remove it when solved.
println!("cargo:rustc-link-arg=/stack:{}", 8 * 1024 * 1024);
let manifest = std::path::Path::new("resources/windows/manifest.xml");
println!("cargo:rerun-if-changed={}", manifest.display());
println!("cargo:rustc-link-arg-bins=/MANIFEST:EMBED");
println!(
"cargo:rustc-link-arg-bins=/MANIFESTINPUT:{}",
manifest.canonicalize().unwrap().display()
);
}
}

View file

@ -0,0 +1,8 @@
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:application>
<asmv3:windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>