Skip to content

Commit e73b296

Browse files
committed
Fix Proton compatibility and compilation on Linux
1 parent 3858310 commit e73b296

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

NobetaTrainer/NobetaTrainer.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<TargetFramework>net6.0</TargetFramework>
55
<AssemblyName>NobetaTrainer</AssemblyName>
66
<Description>Little Witch Nobeta speedrun Trainer tool</Description>
7-
<Version>1.4.3</Version>
7+
<Version>1.4.4</Version>
88
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
9-
<LangVersion>latest</LangVersion>
9+
<LangVersion>preview</LangVersion>
1010
<RestoreAdditionalProjectSources>
1111
https://api.nuget.org/v3/index.json;
1212
https://nuget.bepinex.dev/v3/index.json;

NobetaTrainer/Overlay/NobetaTrainerOverlay.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ protected override Task PostInitialized()
2727

2828
IL2CPP.il2cpp_thread_attach(IL2CPP.il2cpp_domain_get());
2929
NobetaProcessUtils.OverlayWindowHandle = NobetaProcessUtils.FindWindow(null, "NobetaTrainer");
30-
NobetaProcessUtils.HideOverlayFromTaskbar();
30+
31+
// Do not hide window if running under Proton/Wine
32+
if (!NobetaProcessUtils.IsProton())
33+
{
34+
NobetaProcessUtils.HideOverlayFromTaskbar();
35+
}
3136

3237
return Task.CompletedTask;
3338
}

NobetaTrainer/Utils/NobetaProcessUtils.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,9 @@ public static void FocusNobetaWindow()
169169
SetForegroundWindow(GameWindowHandle);
170170
ShowWindow(GameWindowHandle, (int) ShowWindowCommands.SW_SHOW);
171171
}
172+
173+
public static bool IsProton()
174+
{
175+
return Process.GetProcessesByName("winlogon").Length is 0;
176+
}
172177
}

0 commit comments

Comments
 (0)