Fix profile loading on latest SteamOS stable update
This commit is contained in:
parent
f42efab0b0
commit
69f6b800be
3 changed files with 13 additions and 6 deletions
|
@ -1,10 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#cargo build --release --target x86_64-unknown-linux-musl
|
#cargo build --release --target x86_64-unknown-linux-musl
|
||||||
cargo build --target x86_64-unknown-linux-musl
|
#cargo build --target x86_64-unknown-linux-musl
|
||||||
#cross build --release
|
#cross build
|
||||||
|
cargo build
|
||||||
|
|
||||||
mkdir -p ../bin
|
mkdir -p ../bin
|
||||||
#cp ./target/x86_64-unknown-linux-musl/release/powertools ../bin/backend
|
#cp ./target/x86_64-unknown-linux-musl/release/powertools ../bin/backend
|
||||||
cp ./target/x86_64-unknown-linux-musl/debug/powertools ../bin/backend
|
#cp ./target/x86_64-unknown-linux-musl/debug/powertools ../bin/backend
|
||||||
#cp ./target/release/powertools ../bin/backend
|
#cp ./target/debug/powertools ../bin/backend
|
||||||
|
cp ./target/debug/powertools ../bin/backend
|
||||||
|
|
|
@ -57,11 +57,13 @@ pub fn load_settings(
|
||||||
setter(*id as i64, name.to_owned());
|
setter(*id as i64, name.to_owned());
|
||||||
vec![true.into()]
|
vec![true.into()]
|
||||||
} else {
|
} else {
|
||||||
|
log::warn!("load_settings missing name parameter");
|
||||||
vec!["load_settings missing name parameter".into()]
|
vec!["load_settings missing name parameter".into()]
|
||||||
}
|
}
|
||||||
//let mut general_lock = unwrap_lock(settings.general.lock(), "general");
|
//let mut general_lock = unwrap_lock(settings.general.lock(), "general");
|
||||||
} else {
|
} else {
|
||||||
vec!["load_settings missing path parameter".into()]
|
log::warn!("load_settings missing id parameter");
|
||||||
|
vec!["load_settings missing id parameter".into()]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,6 +161,7 @@ const reload = function() {
|
||||||
// register Steam callbacks
|
// register Steam callbacks
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
lifetimeHook = SteamClient.GameSessions.RegisterForAppLifetimeNotifications((update) => {
|
lifetimeHook = SteamClient.GameSessions.RegisterForAppLifetimeNotifications((update) => {
|
||||||
|
backend.log(backend.LogLevel.Info, "RegisterForAppLifetimeNotifications callback(" + JSON.stringify(update, null, 2) + ")");
|
||||||
if (update.bRunning) {
|
if (update.bRunning) {
|
||||||
//backend.log(backend.LogLevel.Debug, "AppID " + update.unAppID.toString() + " is now running");
|
//backend.log(backend.LogLevel.Debug, "AppID " + update.unAppID.toString() + " is now running");
|
||||||
} else {
|
} else {
|
||||||
|
@ -175,9 +176,11 @@ const reload = function() {
|
||||||
startHook = SteamClient.Apps.RegisterForGameActionStart((actionType, id) => {
|
startHook = SteamClient.Apps.RegisterForGameActionStart((actionType, id) => {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
let gameInfo: any = appStore.GetAppOverviewByGameID(id);
|
let gameInfo: any = appStore.GetAppOverviewByGameID(id);
|
||||||
|
|
||||||
|
backend.log(backend.LogLevel.Info, "RegisterForGameActionStart callback(" + actionType + ", " + id + ")");
|
||||||
// don't use gameInfo.appid, haha
|
// don't use gameInfo.appid, haha
|
||||||
backend.resolve(
|
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)}
|
(ok: boolean) => {backend.log(backend.LogLevel.Debug, "Loading settings ok? " + ok)}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue