Fix stale cache launches, FNF runtime deps, and uninstall focus death (v0.1.20)
- Inject the user-level shared-libs dir into LD_LIBRARY_PATH for installed games so FNF finds libvlc.so.5 (idempotent, avoids duplicate entries) - Reconcile cached installs against butlerd's live caves: normalize int/float ids, wait for butlerd when the cache claims installs, keep the cache when Fetch.Caves fails, and re-save the reconciled cache - get_caves() returns null on RPC error (vs [] for genuinely nothing installed) so callers can tell a transient failure apart - Patch freshly installed/updated items in place so the Play button launches the new binary immediately - Drop and re-add items through the LibraryManager so the library menu re-renders after install/uninstall (core handler is a no-op upstream) - Restore launch-page focus after uninstall by searching get_tree().root: get_tree().current_scene is null in OGPU, so the old fix silently no-oped and left the D-pad dead
This commit is contained in:
parent
8a2d8b5374
commit
8b393090ca
3 changed files with 188 additions and 22 deletions
|
|
@ -463,23 +463,26 @@ func _fetch_collection_games(profile_id: int, collections: Array) -> Array:
|
|||
|
||||
|
||||
## Returns every installed game (a "cave" in butlerd terminology).
|
||||
func get_caves() -> Array:
|
||||
## Returns `null` when butlerd is unreachable or the call errored, so callers
|
||||
## can tell a genuine "no games installed" (`[]`) apart from a transient
|
||||
## failure.
|
||||
func get_caves() -> Variant:
|
||||
return await thread_group.exec(_get_caves)
|
||||
|
||||
|
||||
func _get_caves() -> Array:
|
||||
func _get_caves() -> Variant:
|
||||
var params := {}
|
||||
var res := await _rpc_call("Fetch.Caves", params)
|
||||
if "error" in res:
|
||||
logger.warn("Fetch.Caves failed: " + str(res["error"]))
|
||||
return []
|
||||
return null
|
||||
if res.get("stale", false):
|
||||
logger.info("Caves are stale. Refreshing from itch.io.")
|
||||
params["fresh"] = true
|
||||
res = await _rpc_call("Fetch.Caves", params)
|
||||
if "error" in res:
|
||||
logger.warn("Fetch.Caves (fresh) failed: " + str(res["error"]))
|
||||
return []
|
||||
return null
|
||||
return res.get("items", [])
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue