Skip to content

Commit

Permalink
Issue #106: Explicitly unconnected devices in saved configuration are…
Browse files Browse the repository at this point in the history
… disconnected upon calling -[MIKMIDIConfigurationManager loadConfiguration].
  • Loading branch information
Andrew Madsen committed Nov 11, 2015
1 parent f6627cb commit e373619
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/MIKMIDIConnectionManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ - (void)saveConfiguration
- (void)loadConfiguration
{
for (MIKMIDIDevice *device in self.availableDevices) {
if ([self deviceIsConnectedInSavedConfiguration:device]) {
if ([self deviceIsUnconnectedInSavedConfiguration:device]) {
[self internalDisconnectFromDevice:device];
} else if ([self deviceIsConnectedInSavedConfiguration:device]) {
NSError *error = nil;
if (![self internalConnectToDevice:device error:&error]) {
NSLog(@"Unable to connect to MIDI device %@: %@", device, error);
Expand Down

0 comments on commit e373619

Please sign in to comment.