Skip to content

Commit

Permalink
GFX: simpify swtich in caps_advertise
Browse files Browse the repository at this point in the history
  • Loading branch information
jsorg71 committed Jan 15, 2024
1 parent bc1d313 commit c595161
Showing 1 changed file with 10 additions and 39 deletions.
49 changes: 10 additions & 39 deletions xrdp/xrdp_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,8 @@ xrdp_mm_egfx_caps_advertise(void *user, int caps_count,
version, flags, index);
switch (version)
{
case XR_RDPGFX_CAPVERSION_8:
case XR_RDPGFX_CAPVERSION_8: /* FALLTHROUGH */
case XR_RDPGFX_CAPVERSION_101:
best_pro_index = index;
break;
case XR_RDPGFX_CAPVERSION_81:
Expand All @@ -1252,51 +1253,21 @@ xrdp_mm_egfx_caps_advertise(void *user, int caps_count,
}
best_pro_index = index;
break;
case XR_RDPGFX_CAPVERSION_101:
best_pro_index = index;
break;
case XR_RDPGFX_CAPVERSION_102:
if (!(flags & XR_RDPGFX_CAPS_FLAG_AVC_DISABLED))
{
best_h264_index = index;
}
best_pro_index = index;
break;
case XR_RDPGFX_CAPVERSION_103:
if (!(flags & XR_RDPGFX_CAPS_FLAG_AVC_DISABLED))
{
best_h264_index = index;
}
best_pro_index = index;
break;
case XR_RDPGFX_CAPVERSION_104:
if (!(flags & XR_RDPGFX_CAPS_FLAG_AVC_DISABLED))
{
best_h264_index = index;
}
best_pro_index = index;
break;
case XR_RDPGFX_CAPVERSION_105:
if (!(flags & XR_RDPGFX_CAPS_FLAG_AVC_DISABLED))
{
best_h264_index = index;
}
best_pro_index = index;
break;
case XR_RDPGFX_CAPVERSION_106:
if (!(flags & XR_RDPGFX_CAPS_FLAG_AVC_DISABLED))
{
best_h264_index = index;
}
best_pro_index = index;
break;
case XR_RDPGFX_CAPVERSION_102: /* FALLTHROUGH */
case XR_RDPGFX_CAPVERSION_103: /* FALLTHROUGH */
case XR_RDPGFX_CAPVERSION_104: /* FALLTHROUGH */
case XR_RDPGFX_CAPVERSION_105: /* FALLTHROUGH */
case XR_RDPGFX_CAPVERSION_106: /* FALLTHROUGH */
case XR_RDPGFX_CAPVERSION_107:
if (!(flags & XR_RDPGFX_CAPS_FLAG_AVC_DISABLED))
{
best_h264_index = index;
}
best_pro_index = index;
break;
default:
/* just skip unknwown */
break;
}
}
if (best_pro_index >= 0)
Expand Down

0 comments on commit c595161

Please sign in to comment.