File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -137,10 +137,26 @@ private static void LaunchGameViaLegendary()
137137
138138 private static void LaunchGameViaHeroic ( )
139139 {
140- Logger . LogWarning ( "Launching via Heroic..." ) ;
141- Process heroic = RunCommandInShell (
142- "xdg-open 'heroic://launch?appName=Sugar&runner=legendary&arg=-rlbot&arg=RLBot_ControllerURL%3D127.0.0.1%3A23233&arg=RLBot_PacketSendRate%3D240&arg=-nomovie'"
143- ) ;
140+ Process heroic ;
141+
142+ if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
143+ {
144+ heroic = RunCommandInShell (
145+ "xdg-open 'heroic://launch?appName=Sugar&runner=legendary&arg=-rlbot&arg=RLBot_ControllerURL%3D127.0.0.1%3A23233&arg=RLBot_PacketSendRate%3D240&arg=-nomovie'"
146+ ) ;
147+ }
148+ else if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
149+ {
150+ heroic = RunCommandInShell (
151+ "start \" \" \" heroic://launch?appName=Sugar&runner=legendary&arg=-rlbot&arg=RLBot_ControllerURL%3D127.0.0.1%3A23233&arg=RLBot_PacketSendRate%3D240&arg=-nomovie\" "
152+ ) ;
153+ }
154+ else
155+ {
156+ throw new PlatformNotSupportedException (
157+ "RLBot is not supported on non-Windows/Linux platforms"
158+ ) ;
159+ }
144160 heroic . Start ( ) ;
145161 }
146162
You can’t perform that action at this time.
0 commit comments