Skip to content

Commit 0a5da99

Browse files
committed
fix(HotKey::Recording): Disable hotkey for recording if can't register it.
Fixes SOUNDSWITCH-G
1 parent b61c347 commit 0a5da99

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

SoundSwitch/Model/AppModel.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,11 @@ public void InitializeMain()
224224

225225
ProfileManager = new ProfileManager(new WindowMonitor(), AudioSwitcher.Instance, ActiveAudioDeviceLister, TrayIcon.ShowError, new TriggerFactory(), _notificationManager);
226226
RegisterHotKey(AppConfigs.Configuration.PlaybackHotKey);
227-
RegisterHotKey(AppConfigs.Configuration.RecordingHotKey);
227+
if (!RegisterHotKey(AppConfigs.Configuration.RecordingHotKey))
228+
{
229+
AppConfigs.Configuration.RecordingHotKey.Enabled = false;
230+
AppConfigs.Configuration.Save();
231+
}
228232
if (!RegisterHotKey(AppConfigs.Configuration.MuteRecordingHotKey))
229233
{
230234
AppConfigs.Configuration.MuteRecordingHotKey.Enabled = false;

0 commit comments

Comments
 (0)