From 1e1e9a445b2468fb1cb9dc1b1a1a55914a6316c3 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Fri, 6 Sep 2024 08:37:52 +0200 Subject: [PATCH] [utils,gfx] add rdpgfx_caps_version_str --- include/freerdp/utils/gfx.h | 2 ++ libfreerdp/gdi/gfx.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/include/freerdp/utils/gfx.h b/include/freerdp/utils/gfx.h index 0f5c1898e..1e487862b 100644 --- a/include/freerdp/utils/gfx.h +++ b/include/freerdp/utils/gfx.h @@ -30,6 +30,8 @@ extern "C" { #endif + FREERDP_API const char* rdpgfx_caps_version_str(UINT32 capsVersion); + FREERDP_API const char* rdpgfx_get_cmd_id_string(UINT16 cmdId); FREERDP_API const char* rdpgfx_get_codec_id_string(UINT16 codecId); diff --git a/libfreerdp/gdi/gfx.c b/libfreerdp/gdi/gfx.c index 7972243f7..2b44a5f0d 100644 --- a/libfreerdp/gdi/gfx.c +++ b/libfreerdp/gdi/gfx.c @@ -1941,3 +1941,34 @@ void gdi_graphics_pipeline_uninit(rdpGdi* gdi, RdpgfxClientContext* gfx) PROFILER_PRINT_FOOTER PROFILER_FREE(gfx->SurfaceProfiler) } + +const char* rdpgfx_caps_version_str(UINT32 capsVersion) +{ + switch (capsVersion) + { + case RDPGFX_CAPVERSION_8: + return "RDPGFX_CAPVERSION_8"; + case RDPGFX_CAPVERSION_81: + return "RDPGFX_CAPVERSION_81"; + case RDPGFX_CAPVERSION_10: + return "RDPGFX_CAPVERSION_10"; + case RDPGFX_CAPVERSION_101: + return "RDPGFX_CAPVERSION_101"; + case RDPGFX_CAPVERSION_102: + return "RDPGFX_CAPVERSION_102"; + case RDPGFX_CAPVERSION_103: + return "RDPGFX_CAPVERSION_103"; + case RDPGFX_CAPVERSION_104: + return "RDPGFX_CAPVERSION_104"; + case RDPGFX_CAPVERSION_105: + return "RDPGFX_CAPVERSION_105"; + case RDPGFX_CAPVERSION_106: + return "RDPGFX_CAPVERSION_106"; + case RDPGFX_CAPVERSION_106_ERR: + return "RDPGFX_CAPVERSION_106_ERR"; + case RDPGFX_CAPVERSION_107: + return "RDPGFX_CAPVERSION_107"; + default: + return "RDPGFX_CAPVERSION_UNKNOWN"; + } +}