diff --git a/StarterNG.Tests/SettingsStoreTests.cs b/StarterNG.Tests/SettingsStoreTests.cs index ba870a9..f5501e5 100644 --- a/StarterNG.Tests/SettingsStoreTests.cs +++ b/StarterNG.Tests/SettingsStoreTests.cs @@ -5,7 +5,8 @@ namespace StarterNG.Tests; public class SettingsStoreTests { - private const string UserIni = "/home/kolejarz/.config/MaSzyna/eu07.ini"; + // Joined the way SettingsPaths joins it, so it matches on a Windows host too. + private static readonly string UserIni = Path.Combine("/home/kolejarz", ".config", "MaSzyna", "eu07.ini"); private static TestInstallation WithHome(InMemoryFileSystem? files = null) { diff --git a/StarterNG/Views/Depot/ConsistDragging.cs b/StarterNG/Views/Depot/ConsistDragging.cs index 8b6bbc6..04711f2 100644 --- a/StarterNG/Views/Depot/ConsistDragging.cs +++ b/StarterNG/Views/Depot/ConsistDragging.cs @@ -104,9 +104,9 @@ public sealed class ConsistDragging public void MiniPreviewPressed(object? sender, PointerPressedEventArgs e) { - if (_browserSelected() is null || !e.GetCurrentPoint(miniPreviewPanel).Properties.IsLeftButtonPressed) + if (_browserSelected() is not { } texture || !e.GetCurrentPoint(miniPreviewPanel).Properties.IsLeftButtonPressed) return; - ArmVehicleDrag(e, miniPreviewPanel, _browserSelected()); + ArmVehicleDrag(e, miniPreviewPanel, texture); } public void VehicleListPressed(object? sender, PointerPressedEventArgs e)