From 6ab9fd95f416a6b0743d51867949aea9d8ad08c4 Mon Sep 17 00:00:00 2001 From: shupershuff <63577525+shupershuff@users.noreply.github.com> Date: Fri, 23 Aug 2024 21:29:07 +1200 Subject: [PATCH] Update D2Loader.ps1 --- D2Loader.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/D2Loader.ps1 b/D2Loader.ps1 index c9bae4f..4b70a25 100644 --- a/D2Loader.ps1 +++ b/D2Loader.ps1 @@ -3522,11 +3522,11 @@ Function Processing { } If ($Script:Config.RememberWindowLocations -eq $True){ #If user has enabled the feature to automatically move game Windows to preferred screen locations. if ($Script:AccountChoice.WindowXCoordinates -ne "" -and $Script:AccountChoice.WindowYCoordinates -ne "" -and $Null -ne $Script:AccountChoice.WindowXCoordinates -and $Null -ne $Script:AccountChoice.WindowYCoordinates -and $Script:AccountChoice.WindowWidth -ne "" -and $Script:AccountChoice.WindowHeight -ne "" -and $Null -ne $Script:AccountChoice.WindowWidth -and $Null -ne $Script:AccountChoice.WindowHeight){ #Check if the account has had coordinates saved yet. - $GetAdd-WindowTypeFunc = $(Get-Command Add-WindowType).Definition + $GetAddWindowTypeFunc = $(Get-Command Add-WindowType).Definition $GetSetWindowLocationsFunc = $(Get-Command SetWindowLocations).Definition $JobID = (Start-Job -ScriptBlock { # Run this in a background job so we don't have to wait for it to complete start-sleep -milliseconds 2024 # We need to wait for about 2 seconds for game to load as if we move it too early, the game itself will reposition the window. Absolute minimum is 420 milliseconds (funnily enough). Delay may need to be a bit higher for people with wooden computers. - Invoke-Expression "function Add-WindowType {$using:GetAdd-WindowTypeFunc}" + Invoke-Expression "function Add-WindowType {$using:GetAddWindowTypeFunc}" Invoke-Expression "function SetWindowLocations {$using:GetSetWindowLocationsFunc}" SetWindowLocations -x $Using:AccountChoice.WindowXCoordinates -y $Using:AccountChoice.WindowYCoordinates -Width $Using:AccountChoice.WindowWidth -height $Using:AccountChoice.WindowHeight -Id $Using:process.id }).id