# HG changeset patch
# User StephaneLenclud
# Date 1365806713 -7200
# Node ID ad71cf47d037545f34e9774226de930fae9ede04
# Parent  f1413622948fafdab594547eafb265d3c5672000
Now parses second line of text from set VFD text messages.

diff -r f1413622948f -r ad71cf47d037 SoundGraphAccess.cpp
--- a/SoundGraphAccess.cpp	Fri Apr 12 02:32:34 2013 +0200
+++ b/SoundGraphAccess.cpp	Sat Apr 13 00:45:13 2013 +0200
@@ -173,9 +173,33 @@
 		int textLen=strlen(aMsg)-strlen(KMsgSetVfdText);
 		strncpy(gTextFirstLine,aMsg+strlen(KMsgSetVfdText),textLen);
 		gTextFirstLine[textLen]='\0';
+		//Check if we have a second line
+		char* ptr=strchr(gTextFirstLine,'\n');
+		if (ptr!=NULL)
+			{
+			*ptr='\0'; //Terminate our first line here
+			ptr++;
+			//Get our second line
+			textLen=strlen(ptr);
+			strncpy(gTextSecondLine,ptr,textLen);
+			gTextSecondLine[textLen]='\0';
+			}
+		else
+			{
+			//No second line specified
+			gTextSecondLine[0]='\0';
+			gTextSecondLine16[0]='\0';
+			}
+
+		//Convert first line
 		OutputDebugStringA(gTextFirstLine);
 		int convertedChars = MultiByteToWideChar(CP_UTF8, 0, gTextFirstLine, -1, gTextFirstLine16, sizeof(gTextFirstLine16));
 		OutputDebugString(gTextFirstLine16);
+		//Convert second line
+		OutputDebugStringA(gTextSecondLine);
+		convertedChars = MultiByteToWideChar(CP_UTF8, 0, gTextSecondLine, -1, gTextSecondLine16, sizeof(gTextSecondLine16));
+		OutputDebugString(gTextSecondLine16);
+
 		//IMON API call need to be done from window thread for some reason
 		SendMessageToServer(KRspPending);
 		if (!m_IsInit)