|
@@ -51,13 +51,13 @@ Error MIDIDriverCoreMidi::open() {
|
|
|
OSStatus result = MIDIClientCreate(name, NULL, NULL, &client);
|
|
|
CFRelease(name);
|
|
|
if (result != noErr) {
|
|
|
- ERR_PRINTS("MIDIClientCreate failed: " + String(GetMacOSStatusErrorString(result)));
|
|
|
+ ERR_PRINTS("MIDIClientCreate failed, code: " + itos(result));
|
|
|
return ERR_CANT_OPEN;
|
|
|
}
|
|
|
|
|
|
result = MIDIInputPortCreate(client, CFSTR("Godot Input"), MIDIDriverCoreMidi::read, (void *)this, &port_in);
|
|
|
if (result != noErr) {
|
|
|
- ERR_PRINTS("MIDIInputPortCreate failed: " + String(GetMacOSStatusErrorString(result)));
|
|
|
+ ERR_PRINTS("MIDIInputPortCreate failed, code: " + itos(result));
|
|
|
return ERR_CANT_OPEN;
|
|
|
}
|
|
|
|
|
@@ -65,7 +65,7 @@ Error MIDIDriverCoreMidi::open() {
|
|
|
for (int i = 0; i < sources; i++) {
|
|
|
|
|
|
MIDIEndpointRef source = MIDIGetSource(i);
|
|
|
- if (source != NULL) {
|
|
|
+ if (source) {
|
|
|
MIDIPortConnectSource(port_in, source, (void *)this);
|
|
|
connected_sources.insert(i, source);
|
|
|
}
|