浏览代码

Fixed handshakes

Krzysztof Krysiński 2 年之前
父节点
当前提交
bd538a1c0d
共有 2 个文件被更改,包括 8 次插入2 次删除
  1. 8 1
      src/PixiEditor/App.xaml.cs
  2. 0 1
      src/PixiEditor/Views/MainWindow.xaml.cs

+ 8 - 1
src/PixiEditor/App.xaml.cs

@@ -53,7 +53,7 @@ internal partial class App : Application
 
         AddNativeAssets();
 
-        IPlatform.RegisterPlatform(GetActivePlatform());
+        InitPlatform();
 
         ExtensionLoader extensionLoader = new ExtensionLoader();
         extensionLoader.LoadExtensions();
@@ -62,6 +62,13 @@ internal partial class App : Application
         MainWindow.Show();
     }
 
+    private void InitPlatform()
+    {
+        var platform = GetActivePlatform();
+        IPlatform.RegisterPlatform(platform);
+        platform.PerformHandshake();
+    }
+
     private IPlatform GetActivePlatform()
     {
 #if STEAM

+ 0 - 1
src/PixiEditor/Views/MainWindow.xaml.cs

@@ -56,7 +56,6 @@ internal partial class MainWindow : Window
         platform = services.GetRequiredService<IPlatform>();
         DataContext = services.GetRequiredService<ViewModelMain>();
 
-        platform.PerformHandshake();
         DataContext.Setup(services);
 
         InitializeComponent();