Now parses second line of text from set VFD text messages.
1.1 --- a/SoundGraphAccess.cpp Fri Apr 12 02:32:34 2013 +0200
1.2 +++ b/SoundGraphAccess.cpp Sat Apr 13 00:45:13 2013 +0200
1.3 @@ -173,9 +173,33 @@
1.4 int textLen=strlen(aMsg)-strlen(KMsgSetVfdText);
1.5 strncpy(gTextFirstLine,aMsg+strlen(KMsgSetVfdText),textLen);
1.6 gTextFirstLine[textLen]='\0';
1.7 + //Check if we have a second line
1.8 + char* ptr=strchr(gTextFirstLine,'\n');
1.9 + if (ptr!=NULL)
1.10 + {
1.11 + *ptr='\0'; //Terminate our first line here
1.12 + ptr++;
1.13 + //Get our second line
1.14 + textLen=strlen(ptr);
1.15 + strncpy(gTextSecondLine,ptr,textLen);
1.16 + gTextSecondLine[textLen]='\0';
1.17 + }
1.18 + else
1.19 + {
1.20 + //No second line specified
1.21 + gTextSecondLine[0]='\0';
1.22 + gTextSecondLine16[0]='\0';
1.23 + }
1.24 +
1.25 + //Convert first line
1.26 OutputDebugStringA(gTextFirstLine);
1.27 int convertedChars = MultiByteToWideChar(CP_UTF8, 0, gTextFirstLine, -1, gTextFirstLine16, sizeof(gTextFirstLine16));
1.28 OutputDebugString(gTextFirstLine16);
1.29 + //Convert second line
1.30 + OutputDebugStringA(gTextSecondLine);
1.31 + convertedChars = MultiByteToWideChar(CP_UTF8, 0, gTextSecondLine, -1, gTextSecondLine16, sizeof(gTextSecondLine16));
1.32 + OutputDebugString(gTextSecondLine16);
1.33 +
1.34 //IMON API call need to be done from window thread for some reason
1.35 SendMessageToServer(KRspPending);
1.36 if (!m_IsInit)