mirror of
https://github.com/lightsoutgames/bevy_full_throttle
synced 2024-11-15 04:45:56 +00:00
19 lines
392 B
Rust
19 lines
392 B
Rust
use bevy::prelude::*;
|
|
#[cfg(windows)]
|
|
use windows::Win32::System::{Power, SystemServices::GUID_MIN_POWER_SAVINGS};
|
|
|
|
fn setup() {
|
|
#[cfg(windows)]
|
|
unsafe {
|
|
Power::PowerSetActiveScheme(None, &GUID_MIN_POWER_SAVINGS);
|
|
}
|
|
}
|
|
|
|
pub struct FullThrottlePlugin;
|
|
|
|
impl Plugin for FullThrottlePlugin {
|
|
fn build(&self, app: &mut App) {
|
|
app.add_startup_system(setup);
|
|
}
|
|
}
|