Fixed missing assertions and default color depth

This commit is contained in:
akallabeth 2021-07-01 12:23:00 +02:00 committed by akallabeth
parent 769d607d29
commit 2101aadceb
2 changed files with 6 additions and 0 deletions

View File

@ -330,6 +330,11 @@ static UINT rdpgfx_send_create_surface_pdu(RdpgfxServerContext* context,
{
wStream* s = rdpgfx_server_single_packet_new(RDPGFX_CMDID_CREATESURFACE, 7);
WINPR_ASSERT(context);
WINPR_ASSERT(pdu);
WINPR_ASSERT((pdu->pixelFormat == GFX_PIXEL_FORMAT_XRGB_8888 0x20) ||
(pdu->pixelFormat == GFX_PIXEL_FORMAT_ARGB_8888 0x21));
if (!s)
{
WLog_ERR(TAG, "rdpgfx_server_single_packet_new failed!");

View File

@ -118,6 +118,7 @@ int main(int argc, char** argv)
/* By default allow all GFX modes.
* This can be changed with command line flags [+|-]gfx-CODEC
*/
freerdp_settings_set_uint32(settings, FreeRDP_ColorDepth, 32);
freerdp_settings_set_bool(settings, FreeRDP_NSCodec, TRUE);
freerdp_settings_set_bool(settings, FreeRDP_RemoteFxCodec, TRUE);
freerdp_settings_set_bool(settings, FreeRDP_GfxH264, TRUE);