Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ba75b1583a | ||
![]() |
45068ea932 |
@@ -102,25 +102,26 @@ namespace Torch.Server
|
||||
}
|
||||
#endif
|
||||
|
||||
var gameThread = new Thread(() =>
|
||||
var uiThread = new Thread(() =>
|
||||
{
|
||||
_server.Init();
|
||||
var ui = new TorchUI(_server);
|
||||
|
||||
if (Config.Autostart || Config.TempAutostart)
|
||||
{
|
||||
Config.TempAutostart = false;
|
||||
_server.Start();
|
||||
}
|
||||
SynchronizationContext.SetSynchronizationContext(
|
||||
new DispatcherSynchronizationContext(Dispatcher.CurrentDispatcher));
|
||||
|
||||
ui.ShowDialog();
|
||||
});
|
||||
|
||||
gameThread.Start();
|
||||
uiThread.SetApartmentState(ApartmentState.STA);
|
||||
uiThread.Start();
|
||||
|
||||
var ui = new TorchUI(_server);
|
||||
_server.Init();
|
||||
|
||||
SynchronizationContext.SetSynchronizationContext(
|
||||
new DispatcherSynchronizationContext(Dispatcher.CurrentDispatcher));
|
||||
|
||||
ui.ShowDialog();
|
||||
if (Config.Autostart || Config.TempAutostart)
|
||||
{
|
||||
Config.TempAutostart = false;
|
||||
_server.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -12,7 +12,7 @@ namespace Torch.Server
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
[STAThread]
|
||||
[MTAThread]
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var configurationBuilder = new ConfigurationBuilder()
|
||||
|
@@ -47,7 +47,7 @@ namespace Torch.Utils
|
||||
|
||||
private static void CopyNative()
|
||||
{
|
||||
if (ApplicationContext.Current.GameFilesDirectory.Attributes.HasFlag(FileAttributes.ReadOnly))
|
||||
if (ApplicationContext.Current.IsService || ApplicationContext.Current.GameFilesDirectory.Attributes.HasFlag(FileAttributes.ReadOnly))
|
||||
{
|
||||
Log.Warn("Torch directory is readonly. You should copy steam_api64.dll, Havok.dll from bin manually");
|
||||
return;
|
||||
|
Reference in New Issue
Block a user