File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ public static void Main(string[] args)
6363 // Breaks on Windows Server 2019
6464 if ( ! new ComputerInfo ( ) . OSFullName . Contains ( "Server 2019" ) && ! Environment . UserInteractive )
6565 {
66- using ( var service = new TorchService ( ) )
66+ using ( var service = new TorchService ( args ) )
6767 ServiceBase . Run ( service ) ;
6868 return ;
6969 }
Original file line number Diff line number Diff line change @@ -15,9 +15,11 @@ class TorchService : ServiceBase
1515 public const string Name = "Torch (SEDS)" ;
1616 private TorchServer _server ;
1717 private Initializer _initializer ;
18+ private string [ ] _args ;
1819
19- public TorchService ( )
20+ public TorchService ( string [ ] args )
2021 {
22+ _args = args ;
2123 var workingDir = new FileInfo ( typeof ( TorchService ) . Assembly . Location ) . Directory . ToString ( ) ;
2224 Directory . SetCurrentDirectory ( workingDir ) ;
2325 _initializer = new Initializer ( workingDir ) ;
@@ -29,11 +31,11 @@ public TorchService()
2931 }
3032
3133 /// <inheritdoc />
32- protected override void OnStart ( string [ ] args )
34+ protected override void OnStart ( string [ ] _ )
3335 {
34- base . OnStart ( args ) ;
36+ base . OnStart ( _args ) ;
3537
36- _initializer . Initialize ( args ) ;
38+ _initializer . Initialize ( _args ) ;
3739 _initializer . Run ( ) ;
3840 }
3941
Original file line number Diff line number Diff line change @@ -199,7 +199,8 @@ private void Create()
199199 }
200200 MyRenderProxy . Initialize ( renderer ) ;
201201 MyRenderProfiler . SetAutocommit ( false ) ;
202- MyRenderProfiler . InitMemoryHack ( "MainEntryPoint" ) ;
202+ //This broke services?
203+ //MyRenderProfiler.InitMemoryHack("MainEntryPoint");
203204 }
204205
205206 // Loads object builder serializers. Intuitive, right?
You can’t perform that action at this time.
0 commit comments