diff --git a/engine/client/cl_gameui.c b/engine/client/cl_gameui.c index b39ee040..633a173f 100644 --- a/engine/client/cl_gameui.c +++ b/engine/client/cl_gameui.c @@ -1273,16 +1273,16 @@ static void pfnEnableTextInput( int enable ) Key_EnableTextInput( enable, false ); } -static int pfnGetRenderers( unsigned int num, char *shortName, size_t size1, char *readableName, size_t size2 ) +static int pfnGetRenderers( unsigned int num, char *short_name, size_t size1, char *long_name, size_t size2 ) { - if( num >= ref.numRenderers ) + if( num >= ref.num_renderers ) return 0; - if( shortName && size1 ) - Q_strncpy( shortName, ref.shortNames[num], size1 ); + if( short_name && size1 ) + Q_strncpy( short_name, ref.short_names[num], size1 ); - if( readableName && size2 ) - Q_strncpy( readableName, ref.readableNames[num], size2 ); + if( long_name && size2 ) + Q_strncpy( long_name, ref.long_names[num], size2 ); return 1; } diff --git a/engine/client/ref_common.c b/engine/client/ref_common.c index e9e496c1..70346ae9 100644 --- a/engine/client/ref_common.c +++ b/engine/client/ref_common.c @@ -623,7 +623,7 @@ static void SetFullscreenModeFromCommandLine( void ) static void R_CollectRendererNames( void ) { // ordering is important! - static const char *shortNames[] = + static const char *short_names[] = { #if XASH_REF_GL_ENABLED "gl", @@ -646,7 +646,7 @@ static void R_CollectRendererNames( void ) }; // ordering is important here too! - static const char *readableNames[ARRAYSIZE( shortNames )] = + static const char *long_names[ARRAYSIZE( short_names )] = { #if XASH_REF_GL_ENABLED "OpenGL", @@ -668,9 +668,9 @@ static void R_CollectRendererNames( void ) #endif }; - ref.numRenderers = ARRAYSIZE( shortNames ); - ref.shortNames = shortNames; - ref.readableNames = readableNames; + ref.num_renderers = ARRAYSIZE( short_names ); + ref.short_names = short_names; + ref.long_names = long_names; } qboolean R_Init( void ) @@ -747,26 +747,26 @@ qboolean R_Init( void ) { int i; - for( i = 0; i < ref.numRenderers; i++ ) + for( i = 0; i < ref.num_renderers; i++ ) { // skip renderer that was requested but failed to load - if( !Q_strcmp( requested_cmdline, ref.shortNames[i] )) + if( !Q_strcmp( requested_cmdline, ref.short_names[i] )) continue; - if( !Q_strcmp( requested_cvar, ref.shortNames[i] )) + if( !Q_strcmp( requested_cvar, ref.short_names[i] )) continue; // do not show bruteforcing attempts, however, warn user about falling back // to software mode - if( !Q_strcmp( "soft", ref.shortNames[i] ) && !host_developer.value ) + if( !Q_strcmp( "soft", ref.short_names[i] ) && !host_developer.value ) Sys_Warn( "Can't initialize any hardware accelerated renderer. Falling back to software rendering...\n" ); - success = R_LoadRenderer( ref.shortNames[i], !host_developer.value ); + success = R_LoadRenderer( ref.short_names[i], !host_developer.value ); if( success ) { // remember last valid renderer - Cvar_DirectSet( &r_refdll, ref.shortNames[i] ); + Cvar_DirectSet( &r_refdll, ref.short_names[i] ); break; } } diff --git a/engine/client/ref_common.h b/engine/client/ref_common.h index ffd6ac80..c5b15d14 100644 --- a/engine/client/ref_common.h +++ b/engine/client/ref_common.h @@ -24,12 +24,12 @@ struct ref_state_s { HINSTANCE hInstance; qboolean initialized; - int numRenderers; + int num_renderers; ref_interface_t dllFuncs; // depends on build configuration - const char **shortNames; - const char **readableNames; + const char **short_names; + const char **long_names; }; extern struct ref_state_s ref; diff --git a/engine/menu_int.h b/engine/menu_int.h index 8f68c43f..dba23f24 100644 --- a/engine/menu_int.h +++ b/engine/menu_int.h @@ -210,7 +210,7 @@ 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 ); + int (*pfnGetRenderers)( unsigned int num, char *short_name, size_t size1, char *long_name, size_t size2 ); double (*pfnDoubleTime)( void ); char *(*pfnParseFile)( char *data, char *buf, const int size, unsigned int flags, int *len );