[core,capabilities] Fix SurfaceCommandsSupported

* Initialize in settings_new with everything supported
* merge client & server settings
* Write capabilities from current SurfaceCommandsSupported setting
This commit is contained in:
Armin Novak 2024-07-24 14:41:15 +02:00 committed by akallabeth
parent 850389de44
commit f167ccff4e
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
2 changed files with 7 additions and 2 deletions

View File

@ -2867,7 +2867,7 @@ static BOOL rdp_apply_surface_commands_capability_set(rdpSettings* settings, con
*/
if (src->FastPathOutput)
{
settings->SurfaceCommandsSupported = src->SurfaceCommandsSupported;
settings->SurfaceCommandsSupported &= src->SurfaceCommandsSupported;
settings->SurfaceCommandsEnabled = src->SurfaceCommandsEnabled;
settings->SurfaceFrameMarkerEnabled = src->SurfaceFrameMarkerEnabled;
}
@ -2916,7 +2916,7 @@ static BOOL rdp_write_surface_commands_capability_set(wStream* s, const rdpSetti
const size_t header = rdp_capability_set_start(s);
// TODO: Make these configurable too
UINT32 cmdFlags = SURFCMDS_SET_SURFACE_BITS | SURFCMDS_STREAM_SURFACE_BITS;
UINT32 cmdFlags = freerdp_settings_get_uint32(settings, FreeRDP_SurfaceCommandsSupported);
if (settings->SurfaceFrameMarkerEnabled)
cmdFlags |= SURFCMDS_FRAME_MARKER;

View File

@ -391,6 +391,11 @@ rdpSettings* freerdp_settings_new(DWORD flags)
if (!settings)
return NULL;
if (!freerdp_settings_set_uint32(settings, FreeRDP_SurfaceCommandsSupported,
SURFCMDS_SET_SURFACE_BITS | SURFCMDS_STREAM_SURFACE_BITS |
SURFCMDS_FRAME_MARKER))
goto out_fail;
if (!freerdp_settings_set_uint32(settings, FreeRDP_RemoteFxRlgrMode, RLGR3))
goto out_fail;