Crates.io | DisplaySettings |
lib.rs | DisplaySettings |
version | 0.1.2 |
source | src |
created_at | 2024-04-27 18:32:47.119878 |
updated_at | 2024-05-12 16:56:49.022689 |
description | Small library to manage display settings on Windows with rust |
homepage | |
repository | https://github.com/PearuUu/DisplaySettings |
max_upload_size | |
id | 1222807 |
size | 13,136 |
Small library to manage display settings on Windows
Report Bug
·
Request Feature
cargo add DisplaySettings
DisplaySettings = "0.1.0"
use DisplaySettings;
use DisplaySettings::get_display_settings;
fn main() {
let display_settings = get_display_settings();
for setting in display_settings {
println!("Width: {}, Height: {}, Refresh Rate: {}", setting.width, setting.height, setting.refresh_rate);
}
}
use DisplaySettings::{set_display_settings, DisplaySettingsType};
fn main() {
let settings = DisplaySettingsType {
width: 1920,
height: 1080,
refresh_rate: 60,
};
let result = set_display_settings(settings);
if result == 0 {
println!("Display settings applied successfully!");
} else {
println!("Failed to apply display settings. Error code: {}", result);
}
}
For more examples, please refer to the Documentation
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Discord - __blur__
Project Link: https://github.com/PearuUu/DisplaySettings