Merge pull request #4703 from fufesou/fix/dpi_awareness_sciter

fix, sciter, dpi awareness
This commit is contained in:
RustDesk 2023-06-20 15:33:24 +08:00 committed by GitHub
commit 13e32ed788
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -27,6 +27,10 @@ fn main() {
if !common::global_init() {
return;
}
#[cfg(all(windows, not(feature = "inline")))]
unsafe {
winapi::um::shellscalingapi::SetProcessDpiAwareness(2);
}
if let Some(args) = crate::core_main::core_main().as_mut() {
ui::start(args);
}

View File

@ -72,10 +72,6 @@ pub fn start(args: &mut [String]) {
allow_err!(sciter::set_options(sciter::RuntimeOptions::GfxLayer(
sciter::GFX_LAYER::WARP
)));
#[cfg(all(windows, not(feature = "inline")))]
unsafe {
winapi::um::shellscalingapi::SetProcessDpiAwareness(2);
}
use sciter::SCRIPT_RUNTIME_FEATURES::*;
allow_err!(sciter::set_options(sciter::RuntimeOptions::ScriptFeatures(
ALLOW_FILE_IO as u8 | ALLOW_SOCKET_IO as u8 | ALLOW_EVAL as u8 | ALLOW_SYSINFO as u8