[PATCH 3/3] WIP: Mac GUI code update for Midi_Host_GetPortName() change

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


TODO: somebody with a mac needs to test this...
---
 src/gui-osx/PrefsController.m | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/gui-osx/PrefsController.m b/src/gui-osx/PrefsController.m
index 2724501a..36d7d6bc 100644
--- a/src/gui-osx/PrefsController.m
+++ b/src/gui-osx/PrefsController.m
@@ -571,11 +571,12 @@ BOOL flag1, flag2;
 	[midiOutPort addItemWithTitle:[NSString stringWithCString:szinPortName encoding:NSASCIIStringEncoding]];
 	
 	int i = 0;
-	const char* portName;
-	while ((portName = Midi_Host_GetPortName(i++, true)))
+	const char* portName = NULL;
+	while ((portName = Midi_Host_GetPortName(portname, +1, true)))
 		[midiInPort addItemWithTitle:[NSString stringWithCString:portName encoding:NSASCIIStringEncoding]];
 	i = 0;
-	while ((portName = Midi_Host_GetPortName(i++, false)))
+	portname = NULL;
+	while ((portName = Midi_Host_GetPortName(portname, +1, false)))
 		[midiOutPort addItemWithTitle:[NSString stringWithCString:portName encoding:NSASCIIStringEncoding]];
 }
 
-- 
2.30.2


--------------C13100BB4891F43814193EBB
Content-Type: text/x-patch; charset=UTF-8;
 name="0002-WIP-Improve-PortMidi-devices-handling.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="0002-WIP-Improve-PortMidi-devices-handling.patch"



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/