Skip to content

Commit f2d3d27

Browse files
committed
Added C:\Windows\Media as default folder for warning sound selection
1 parent 8aa82f2 commit f2d3d27

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

XB1ControllerBatteryIndicator/XB1ControllerBatteryIndicator/SystemTrayView.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ private void LowBatteryWarningSound_Enabled_Click(object sender, RoutedEventArgs
144144
var openWav = new OpenFileDialog
145145
{
146146
DefaultExt = ".wav",
147-
Filter = "WAV audio (*.wav)|*.wav"
147+
Filter = "WAV audio (*.wav)|*.wav",
148+
InitialDirectory = "C:\\Windows\\media\\"
148149
};
149150
var wavResult = openWav.ShowDialog(Application.Current.MainWindow);
150151
if (wavResult.GetValueOrDefault())

XB1ControllerBatteryIndicator/XB1ControllerBatteryIndicator/SystemTrayViewModel.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@ public string TooltipText
6262

6363
private void RefreshControllerState()
6464
{
65-
//Load synchronously (i.e. the thread will stop execution) the low battery warning sound .wav, since it's just
66-
//a tiny file (or it should be, at any rate) that won't impact performance at all. Maybe the filename/path shouldn't
67-
//be hard-coded: we _could_ add a file selector dialog to let the user choose whatever .wav file (s)he desires, and
68-
//then copy it to a directory in the program's root directory or something like that, but I think that would be
69-
//needlessly complex. Keep it simple!
7065
bool lowBatteryWarningSoundPlayed = false;
7166

7267
while(true)

0 commit comments

Comments
 (0)