Skip to content

Commit

Permalink
Merge branch 'develop' into steam-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphiiko committed Dec 23, 2023
2 parents 1a62b6b + 0df5100 commit 4d3836f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- Crash for some users without bluetooth adapters when disabling lighthouse control.
- Error for windows power policies sometimes not being set correctly, even when they are.

## [1.11.2]

Expand Down
3 changes: 2 additions & 1 deletion src-core/src/os/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ pub async fn show_in_folder(path: String) {
}

#[tauri::command]
pub async fn set_windows_power_policy(guid: String) {
pub async fn set_windows_power_policy(mut guid: String) {
guid = guid.to_uppercase();
let parsed_guid = match crate::utils::serialization::string_to_guid(&guid) {
Ok(g) => g,
Err(e) => {
Expand Down
1 change: 1 addition & 0 deletions src-core/src/utils/serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub fn guid_to_string(guid: &GUID) -> String {
guid.Data4[6],
guid.Data4[7]
)
.to_uppercase()
}

// Converts a String to a GUID
Expand Down
1 change: 1 addition & 0 deletions src-ui/app/services/windows.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class WindowsService {
guid: string,
reason: 'SLEEP_MODE_ENABLED' | 'SLEEP_MODE_DISABLED'
): Promise<void> {
guid = guid.toUpperCase();
await invoke<void>('set_windows_power_policy', { guid });
const currentPolicy = await this.getWindowsPowerPolicy();
if (currentPolicy?.guid !== guid) {
Expand Down

0 comments on commit 4d3836f

Please sign in to comment.