Un-hardcode C:\Windows in MidiManager

Keeping an eye out for our bros who put Windows on a drive that isn't C:
This commit is contained in:
Pieter-Jan Briers
2024-02-14 14:32:05 +01:00
parent 4a06acda32
commit 708f5dd376

View File

@@ -114,7 +114,7 @@ internal sealed partial class MidiManager : IMidiManager
"/usr/share/sounds/sf2/TimGM6mb.sf2",
};
private const string WindowsSoundfont = @"C:\WINDOWS\system32\drivers\gm.dls";
private static readonly string WindowsSoundfont = $@"{Environment.GetEnvironmentVariable("SystemRoot")}\system32\drivers\gm.dls";
private const string OsxSoundfont =
"/System/Library/Components/CoreAudio.component/Contents/Resources/gs_instruments.dls";