Skip to content

Commit

Permalink
Disable compat mode on MacOS forcibly (#180)
Browse files Browse the repository at this point in the history
* Disable compat mode on MacOS forcibly

* Reviews

* OOp

* Review electric boogaloo
  • Loading branch information
VasilisThePikachu committed Sep 9, 2024
1 parent 2af7109 commit 83fc005
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
3 changes: 2 additions & 1 deletion SS14.Launcher/Assets/Locale/en-US/text.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ tab-options-open-log-directory = Open log directory
tab-options-account-settings = Account Settings
tab-options-account-settings-desc = You can manage your account settings, such as changing email or password, through our website.
tab-options-compatibility-mode = Compatibility Mode
tab-options-compatibility-mode-desc = This uses OpenGL ES 2 (via ANGLE if necessary), which is less likely to suffer from driver bugs. Try this if you are experiencing graphical issues or crashes.
tab-options-compatibility-mode-desc = This forces the game to use a different graphics backend, which is less likely to suffer from driver bugs. Try this if you are experiencing graphical issues or crashes.
tab-options-log-client = Log Client
tab-options-log-client-desc = Enables logging of any game client output. Useful for developers.
tab-options-log-launcher = Log Launcher
Expand All @@ -326,6 +326,7 @@ tab-options-disable-signing = Disable Engine Signature Checks
tab-options-disable-signing-desc = { "[" }DEV ONLY] Disables verification of engine signatures. DO NOT ENABLE UNLESS YOU KNOW EXACTLY WHAT YOU'RE DOING.
tab-options-hub-settings = Hub Settings
tab-options-hub-settings-desc = Change what hub server or servers you would like to use to fetch the server list.
tab-options-desc-incompatible = This option is incompatible with your platform and has been disabled.
## For the language selection menu.

Expand Down
2 changes: 1 addition & 1 deletion SS14.Launcher/Models/Connector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ private async Task LaunchClientWrap(
"--username", _loginManager.ActiveAccount?.Username ?? ConfigConstants.FallbackUsername,

// GLES2 forcing or using default fallback
"--cvar", $"display.compat={_cfg.GetCVar(CVars.CompatMode)}",
"--cvar", $"display.compat={_cfg.GetCVar(CVars.CompatMode) && !OperatingSystem.IsMacOS()}",

// Tell game we are launcher
"--cvar", "launch.launcher=true"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Diagnostics;
using Splat;
using SS14.Launcher.Localization;
Expand All @@ -21,7 +22,10 @@ public OptionsTabViewModel()
Cfg = Locator.Current.GetRequiredService<DataManager>();
_engineManager = Locator.Current.GetRequiredService<IEngineManager>();
_contentManager = Locator.Current.GetRequiredService<ContentManager>();

DisableIncompatibleMacOS = OperatingSystem.IsMacOS();
}
public bool DisableIncompatibleMacOS { get; }

#if RELEASE
public bool HideDisableSigning => true;
Expand Down
10 changes: 8 additions & 2 deletions SS14.Launcher/Views/MainWindowTabs/OptionsTabView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,16 @@
Text="{loc:Loc tab-options-account-settings-desc}"
Margin="8" />

<CheckBox VerticalAlignment="Center" Margin="4" IsChecked="{Binding CompatMode}" Content="{loc:Loc tab-options-compatibility-mode}" />
<TextBlock VerticalAlignment="Center" TextWrapping="Wrap"
<CheckBox VerticalAlignment="Center" IsVisible="{Binding !DisableIncompatibleMacOS}"
Margin="4" IsChecked="{Binding CompatMode}" Content="{loc:Loc tab-options-compatibility-mode}" />
<CheckBox VerticalAlignment="Center" IsVisible="{Binding DisableIncompatibleMacOS}"
Margin="4" IsChecked="False" IsEnabled="False" Opacity="0.8" Content="{loc:Loc tab-options-compatibility-mode}" />
<TextBlock VerticalAlignment="Center" IsVisible="{Binding !DisableIncompatibleMacOS}" TextWrapping="Wrap"
Text="{loc:Loc tab-options-compatibility-mode-desc}"
Margin="8" />
<TextBlock VerticalAlignment="Center" IsVisible="{Binding DisableIncompatibleMacOS}" TextWrapping="Wrap"
Text="{loc:Loc tab-options-desc-incompatible}"
Margin="8" />

<CheckBox VerticalAlignment="Center" Margin="4" IsChecked="{Binding LogClient}" Content="{loc:Loc tab-options-log-client}" />
<TextBlock VerticalAlignment="Center" TextWrapping="Wrap"
Expand Down

0 comments on commit 83fc005

Please sign in to comment.