Browse Source

take this Steam

Krzysztof Krysiński 2 years ago
parent
commit
874ccb6a5c
1 changed files with 10 additions and 0 deletions
  1. 10 0
      src/PixiEditor/App.xaml.cs

+ 10 - 0
src/PixiEditor/App.xaml.cs

@@ -1,6 +1,8 @@
 using System.IO;
 using System.IO;
 using System.Text.RegularExpressions;
 using System.Text.RegularExpressions;
+using System.Timers;
 using System.Windows;
 using System.Windows;
+using System.Windows.Interop;
 using System.Windows.Media;
 using System.Windows.Media;
 using PixiEditor.Extensions.Common.Localization;
 using PixiEditor.Extensions.Common.Localization;
 using PixiEditor.Models.AppExtensions;
 using PixiEditor.Models.AppExtensions;
@@ -60,6 +62,14 @@ internal partial class App : Application
 
 
         MainWindow = new MainWindow(extensionLoader);
         MainWindow = new MainWindow(extensionLoader);
         MainWindow.Show();
         MainWindow.Show();
+
+#if STEAM
+        RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly;
+        MainWindow.Loaded += (sender, args) => // Ugly hack to fix Steam overlay doing weird stuff with WPF
+        {
+            RenderOptions.ProcessRenderMode = RenderMode.Default;
+        };
+#endif
     }
     }
 
 
     private void InitPlatform()
     private void InitPlatform()