Skip to content

Commit

Permalink
Another bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
liamharper2453 committed Jan 19, 2023
1 parent 6cd3c6c commit c311140
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions MoonlightTVLauncher/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ void EndSession()
{
RunCommand("/c ares-launch -d tv --close com.limelight.webos");
RunCommand("/c explorer.exe");
RunCommand("/c \"" + Environment.CurrentDirectory + "\"" + @"\Dependencies\ChangeScreenResolution.exe /w=" + configuration.OriginalResolutionX + " /h=" + configuration.OriginalResolutionY + " /f=" + configuration.OriginalResolutionHz + " /d=0");
RunCommand("/c \"" + Environment.CurrentDirectory + @"\Dependencies\ChangeScreenResolution.exe" + "\"" + " /w=" + configuration.OriginalResolutionX + " /h=" + configuration.OriginalResolutionY + " /f=" + configuration.OriginalResolutionHz + " /d=0");
RunCommand("/c taskkill /F /IM " + configuration.PcApplicationUsedForStreaming);
RunCommand("/c taskkill /IM " + configuration.PcApplicationBeingLaunched);
moonlightTvStreamActive = false;
//Wait for explorer to start up again before switching back to main desktop
Thread.Sleep(5000);
RunCommand("/c \"" + Environment.CurrentDirectory + "\"" + @"\Dependencies\nircmdc sendkeypress rwin+ctrl+left");
RunCommand("/c \"" + Environment.CurrentDirectory + @"\Dependencies\nircmdc" + "\"" + " sendkeypress rwin+ctrl+left");
}

bool StartStream()
Expand All @@ -105,15 +105,15 @@ bool StartStream()
WakeOnLan.Wake(configuration.TvMacAddress);
}

RunCommand("/c \"" + Environment.CurrentDirectory + "\"" + @"\Dependencies\nircmdc sendkeypress rwin+ctrl+right");
RunCommand("/c \"" + Environment.CurrentDirectory + @"\Dependencies\nircmdc" + "\"" + " sendkeypress rwin+ctrl+right");
//Wait for desktop to switch BEFORE killing explorer
Thread.Sleep(1000);
RunCommand("/c taskkill /F /IM explorer.exe");
RunCommand("/c \"" + Environment.CurrentDirectory + "\"" + @"\Dependencies\ChangeScreenResolution.exe /w=" + configuration.StreamResolutionX + " /h=" + configuration.StreamResolutionY + " /f=" + configuration.StreamResolutionHz + " /d=0");
RunCommand("/c \"" + Environment.CurrentDirectory + @"\Dependencies\ChangeScreenResolution.exe" + "\"" + " /w=" + configuration.StreamResolutionX + " /h=" + configuration.StreamResolutionY + " /f=" + configuration.StreamResolutionHz + " /d=0");
RunCommand("/c ares-launch -d tv com.limelight.webos");
//Give TV some time to open the MoonlightTV app before attempting TV input
Thread.Sleep(3000);
RunCommand("/c py \"" + Environment.CurrentDirectory + "\"" + @"\Scripts\MoonlightTVAutoConnect.py" + " " + configuration.TvIpAddress + " " + configuration.TvClientKey + " " + configuration.TvMoonlightGameIndex);
RunCommand("/c py \"" + Environment.CurrentDirectory + @"\Scripts\MoonlightTVAutoConnect.py" + "\"" + " " + configuration.TvIpAddress + " " + configuration.TvClientKey + " " + configuration.TvMoonlightGameIndex);
}

Console.WriteLine("Streaming application started (" + configuration.PcApplicationUsedForStreaming + "). Output should be appearing on your TV now.");
Expand Down

0 comments on commit c311140

Please sign in to comment.