Fix profile loading on latest SteamOS stable update

This commit is contained in:
NGnius (Graham) 2023-03-26 21:16:13 -04:00
parent f42efab0b0
commit 69f6b800be
3 changed files with 13 additions and 6 deletions

View file

@ -1,10 +1,12 @@
#!/bin/bash
#cargo build --release --target x86_64-unknown-linux-musl
cargo build --target x86_64-unknown-linux-musl
#cross build --release
#cargo build --target x86_64-unknown-linux-musl
#cross build
cargo build
mkdir -p ../bin
#cp ./target/x86_64-unknown-linux-musl/release/powertools ../bin/backend
cp ./target/x86_64-unknown-linux-musl/debug/powertools ../bin/backend
#cp ./target/release/powertools ../bin/backend
#cp ./target/x86_64-unknown-linux-musl/debug/powertools ../bin/backend
#cp ./target/debug/powertools ../bin/backend
cp ./target/debug/powertools ../bin/backend

View file

@ -57,11 +57,13 @@ pub fn load_settings(
setter(*id as i64, name.to_owned());
vec![true.into()]
} else {
log::warn!("load_settings missing name parameter");
vec!["load_settings missing name parameter".into()]
}
//let mut general_lock = unwrap_lock(settings.general.lock(), "general");
} else {
vec!["load_settings missing path parameter".into()]
log::warn!("load_settings missing id parameter");
vec!["load_settings missing id parameter".into()]
}
}
}

View file

@ -161,6 +161,7 @@ const reload = function() {
// register Steam callbacks
//@ts-ignore
lifetimeHook = SteamClient.GameSessions.RegisterForAppLifetimeNotifications((update) => {
backend.log(backend.LogLevel.Info, "RegisterForAppLifetimeNotifications callback(" + JSON.stringify(update, null, 2) + ")");
if (update.bRunning) {
//backend.log(backend.LogLevel.Debug, "AppID " + update.unAppID.toString() + " is now running");
} else {
@ -175,9 +176,11 @@ const reload = function() {
startHook = SteamClient.Apps.RegisterForGameActionStart((actionType, id) => {
//@ts-ignore
let gameInfo: any = appStore.GetAppOverviewByGameID(id);
backend.log(backend.LogLevel.Info, "RegisterForGameActionStart callback(" + actionType + ", " + id + ")");
// don't use gameInfo.appid, haha
backend.resolve(
backend.loadGeneralSettings(id, gameInfo.display_name),
backend.loadGeneralSettings(Number(id), gameInfo.display_name),
(ok: boolean) => {backend.log(backend.LogLevel.Debug, "Loading settings ok? " + ok)}
);
});