Merge pull request #335 from louyihua/master

libfreerdp-codec & wfreerdp
This commit is contained in:
Marc-André Moreau 2012-01-09 15:11:04 -08:00
commit 59549fff6a
2 changed files with 15 additions and 1 deletions

View File

@ -598,6 +598,14 @@ INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
WSADATA wsa_data;
WNDCLASSEX wnd_cls;
if (NULL == getenv("HOME"))
{
char home[MAX_PATH * 2] = "HOME=";
strcat(home, getenv("HOMEDRIVE"));
strcat(home, getenv("HOMEPATH"));
_putenv(home);
}
if (WSAStartup(0x101, &wsa_data) != 0)
return 1;

View File

@ -266,7 +266,10 @@ static void rfx_process_message_channels(RFX_CONTEXT* context, STREAM* s)
stream_read_uint8(s, numChannels); /* numChannels (1 byte), must bet set to 0x01 */
if (numChannels != 1)
/* In RDVH sessions, numChannels will represent the number of virtual monitors
* configured and does not always be set to 0x01 as [MS-RDPRFX] said.
*/
if (numChannels < 1)
{
DEBUG_WARN("numChannels:%d, expected:1", numChannels);
return;
@ -277,6 +280,9 @@ static void rfx_process_message_channels(RFX_CONTEXT* context, STREAM* s)
stream_read_uint16(s, context->width); /* width (2 bytes) */
stream_read_uint16(s, context->height); /* height (2 bytes) */
/* Now, only the first monitor can be used, therefore the other channels will be ignored. */
stream_seek(s, 5 * (numChannels - 1));
DEBUG_RFX("numChannels %d id %d, %dx%d.",
numChannels, channelId, context->width, context->height);
}