Skip to content

Commit

Permalink
Hide OpenLoco on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelJBerk committed Dec 25, 2024
1 parent 40116e5 commit ddd831b
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/openlauncher/MainWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Media.Imaging;
using Avalonia.Platform;
using Avalonia.Threading;
using IntelOrca.OpenLauncher.Core;
using StringResources = openlauncher.Properties.Resources;
Expand All @@ -33,11 +35,14 @@ public MainWindow()
errorBox.Opacity = 0;
updateBoxContainer.Opacity = 0;
}

gameListView.Items = new[] {
new GameMenuItem(Game.OpenRCT2, "avares://openlauncher/resources/icon-openrct2.png"),
new GameMenuItem(Game.OpenLoco, "avares://openlauncher/resources/icon-openloco.png")
};
var isMacos = RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
var openRCT2Game = new GameMenuItem(Game.OpenRCT2, "avares://openlauncher/resources/icon-openrct2.png");
var openLocoGame = new GameMenuItem(Game.OpenLoco, "avares://openlauncher/resources/icon-openloco.png");
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) {
gameListView.Items = new [] {openRCT2Game};
} else {
gameListView.Items = new [] {openRCT2Game, openLocoGame};
}
}

private async void Window_Opened(object sender, EventArgs e)
Expand Down

0 comments on commit ddd831b

Please sign in to comment.