Skip to content

Commit

Permalink
cloudHealth fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dragoonDorise committed Dec 12, 2024
1 parent a95a938 commit 36e60ad
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions functions/cloudSyncHealth.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,21 @@ function cloudSyncHealth(){
$upload=1
$download=1

$result = yesNoDialog -TitleText "CloudSync Health" -MessageText "Do you use EmulationStation to launch your games?" -OKButtonText "Yes" -CancelButtonText "No"
$result = yesNoDialog -TitleText "CloudSync Health" -MessageText "You need to have RetroArch installed for this to work." -OKButtonText "OK" -CancelButtonText "Cancel"

if ($result -eq "OKButton") {
#Launching ESDE
Start-Process powershell.exe -ArgumentList "-ExecutionPolicy Bypass -File `"$toolsPath/launchers/esde/EmulationStationDE.ps1`" "

} else {
$kill = "RETROARCH"
Start-Process powershell.exe -ArgumentList "-ExecutionPolicy Bypass -File `"$toolsPath/launchers/retroarch.ps1`" "

Start-Process powershell.exe -ArgumentList "-ExecutionPolicy Bypass -File `"$toolsPath/launchers/retroarch.ps1`" "
}else{
confirmDialog -TitleText "Manual action" -MessageText "Please install RetroArch from Manage Emulators..."
exit
}

if ($kill -eq "RETROARCH") {
while (-not (Get-Process -Name "retroarch" -ErrorAction SilentlyContinue)) {
echo "waiting for RA to open"
Start-Sleep -Seconds 2
}
}else{
while (-not (Get-Process -Name "ES-DE" -ErrorAction SilentlyContinue)) {
echo "waiting for ESDE to open"
Start-Sleep -Seconds 2
}
while (-not (Get-Process -Name "retroarch" -ErrorAction SilentlyContinue)) {
echo "waiting for RA to open"
Start-Sleep -Seconds 2
}


Start-Sleep -Seconds 5
echo "Creating test file"
echo "testing upload" > "$savesPath/retroarch/test_emudeck.txt"
Expand Down

0 comments on commit 36e60ad

Please sign in to comment.