2
0
Krzysztof Krysiński 2 жил өмнө
parent
commit
bd538a1c0d

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

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

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

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