Skip to content

Commit

Permalink
fix playtime stats from not saving on closing too quickly
Browse files Browse the repository at this point in the history
  • Loading branch information
Nonary committed Jun 5, 2023
1 parent 0d37427 commit 9afc1a7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions PlayniteWatcher-EndScript.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ function CloseLaunchedGame() {
}

function CloseDesktopGracefully() {
# Give Playnite enough time to save playtime statistics
Start-Sleep -Seconds 3
$matchesFound = Get-Content -Path "$path\log.txt" | Select-String "(?<=Launching PlayNite Fullscreen:\s)(?<path>.*)"
if ($null -ne $matchesFound) {
$desktopPath = $matchesFound.Matches[0].Value
Expand Down

0 comments on commit 9afc1a7

Please sign in to comment.