From fe9ed0ac9b17763120554646d12a0187cf884f55 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 12 Dec 2022 00:24:59 +0300 Subject: [PATCH] engine: client: gameui: add new NET_CompareAdrSort function to menu API --- engine/client/cl_gameui.c | 3 ++- engine/menu_int.h | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/engine/client/cl_gameui.c b/engine/client/cl_gameui.c index e5bf2683..5d3b41ec 100644 --- a/engine/client/cl_gameui.c +++ b/engine/client/cl_gameui.c @@ -1262,7 +1262,8 @@ static ui_extendedfuncs_t gExtendedfuncs = pfnGetRenderers, Sys_DoubleTime, pfnParseFileSafe, - NET_AdrToString + NET_AdrToString, + NET_CompareAdrSort, }; void UI_UnloadProgs( void ) diff --git a/engine/menu_int.h b/engine/menu_int.h index d273d8f6..d32c4bb3 100644 --- a/engine/menu_int.h +++ b/engine/menu_int.h @@ -209,12 +209,12 @@ typedef struct ui_extendedfuncs_s { // new engine extended api start here // returns 1 if there are more in list, otherwise 0 int (*pfnGetRenderers)( unsigned int num, char *shortName, size_t size1, char *readableName, size_t size2 ); - double (*pfnDoubleTime)( void ); - char *(*pfnParseFile)( char *data, char *buf, const int size, unsigned int flags, int *len ); - const char *(*pfnAdrToString)( const struct netadr_s a ); + // network address funcs + const char *(*pfnAdrToString)( const struct netadr_s a ); + int (*pfnCompareAdr)( const void *a, const void *b ); // netadr_t } ui_extendedfuncs_t; // deprecated export from old engine