mirror of
https://github.com/lightsoutgames/bevy_full_throttle
synced 2024-11-14 03:45:57 +00:00
Bump dependency.
This commit is contained in:
parent
73e6de96ef
commit
afcb35661d
|
@ -10,4 +10,4 @@ edition = "2021"
|
||||||
bevy = { version = "0.8", default-features = false }
|
bevy = { version = "0.8", default-features = false }
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
windows = { version = "0.39", features = ["Win32_System_Power", "Win32_System_Registry", "Win32_System_SystemServices"] }
|
windows = { version = "0.40", features = ["Win32_System_Power", "Win32_System_Registry", "Win32_System_SystemServices"] }
|
|
@ -40,18 +40,18 @@ fn focus_change(
|
||||||
) {
|
) {
|
||||||
let config: FullThrottleConfig = config
|
let config: FullThrottleConfig = config
|
||||||
.map(|v| *v)
|
.map(|v| *v)
|
||||||
.unwrap_or_else(|| FullThrottleConfig::default());
|
.unwrap_or_else(FullThrottleConfig::default);
|
||||||
for event in focus.iter() {
|
for event in focus.iter() {
|
||||||
if event.focused {
|
if event.focused {
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
unsafe {
|
unsafe {
|
||||||
Power::PowerSetActiveScheme(None, &GUID_MIN_POWER_SAVINGS);
|
Power::PowerSetActiveScheme(None, Some(&GUID_MIN_POWER_SAVINGS));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
if config.restore_original_scheme_on_unfocus {
|
if config.restore_original_scheme_on_unfocus {
|
||||||
unsafe {
|
unsafe {
|
||||||
Power::PowerSetActiveScheme(None, &**scheme);
|
Power::PowerSetActiveScheme(None, Some(&**scheme));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user