Skip to content

Commit

Permalink
test scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
craigkai committed Mar 25, 2024
1 parent 0ac340d commit 44c9e1e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ ts-rs = "6.2"
tauri-plugin-dialog = { version = "2.0.0-beta.2" }
tauri-plugin-fs = { version = "2.0.0-beta.2" }

[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3.9", features = ["shellscalingapi"] }

[features]
# by default Tauri runs in production mode
# when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL
Expand All @@ -33,6 +36,7 @@ default = ["custom-protocol"]
# DO NOT remove this
custom-protocol = ["tauri/custom-protocol"]


[lib]
name = "keshiftlight_configuration_tool_lib"
crate-type = ["staticlib", "cdylib", "rlib"]
5 changes: 5 additions & 0 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

pub fn main() {
#[cfg(target_os = "windows")]
unsafe {
winapi::um::shellscalingapi::SetProcessDpiAwareness(2);
}

keshiftlight_configuration_tool_lib::run();
}

0 comments on commit 44c9e1e

Please sign in to comment.