diff --git a/src/client/refresh/gl1/gl1_sdl.c b/src/client/refresh/gl1/gl1_sdl.c index ec41448b..f4028c03 100644 --- a/src/client/refresh/gl1/gl1_sdl.c +++ b/src/client/refresh/gl1/gl1_sdl.c @@ -206,7 +206,8 @@ int RI_InitContext(void* win) // Coders are stupid. if (win == NULL) { - Com_Error(ERR_FATAL, "R_InitContext() must not be called with NULL argument!"); + Com_Error(ERR_FATAL, "%s() must not be called with NULL argument!", + __func__); return false; } @@ -218,7 +219,8 @@ int RI_InitContext(void* win) if (context == NULL) { - R_Printf(PRINT_ALL, "R_InitContext(): Creating OpenGL Context failed: %s\n", SDL_GetError()); + R_Printf(PRINT_ALL, "%s(): Creating OpenGL Context failed: %s\n", + __func__, SDL_GetError()); window = NULL; @@ -231,7 +233,8 @@ int RI_InitContext(void* win) if (gl_config.major_version < 1 || (gl_config.major_version == 1 && gl_config.minor_version < 4)) { - R_Printf(PRINT_ALL, "R_InitContext(): Got an OpenGL version %d.%d context - need (at least) 1.4!\n", gl_config.major_version, gl_config.minor_version); + R_Printf(PRINT_ALL, "%s(): Got an OpenGL version %d.%d context - need (at least) 1.4!\n", + __func__, gl_config.major_version, gl_config.minor_version); return false; } diff --git a/src/client/refresh/gl3/gl3_sdl.c b/src/client/refresh/gl3/gl3_sdl.c index f345f677..4052f1e9 100644 --- a/src/client/refresh/gl3/gl3_sdl.c +++ b/src/client/refresh/gl3/gl3_sdl.c @@ -316,7 +316,8 @@ int GL3_InitContext(void* win) // Coders are stupid. if (win == NULL) { - Com_Error(ERR_FATAL, "R_InitContext() must not be called with NULL argument!"); + Com_Error(ERR_FATAL, "%s() must not be called with NULL argument!", + __func__); return false; } @@ -328,7 +329,8 @@ int GL3_InitContext(void* win) if(context == NULL) { - R_Printf(PRINT_ALL, "GL3_InitContext(): Creating OpenGL Context failed: %s\n", SDL_GetError()); + R_Printf(PRINT_ALL, "%s(): Creating OpenGL Context failed: %s\n", + __func__, SDL_GetError()); window = NULL; @@ -367,7 +369,8 @@ int GL3_InitContext(void* win) if( !gladLoadGLLoader((void *)SDL_GL_GetProcAddress)) #endif { - R_Printf(PRINT_ALL, "GL3_InitContext(): ERROR: loading OpenGL function pointers failed!\n"); + R_Printf(PRINT_ALL, "%s(): ERROR: loading OpenGL function pointers failed!\n", + __func__); return false; } @@ -377,7 +380,8 @@ int GL3_InitContext(void* win) else if (GLVersion.major < 3 || (GLVersion.major == 3 && GLVersion.minor < 2)) #endif { - R_Printf(PRINT_ALL, "GL3_InitContext(): ERROR: glad only got GL version %d.%d!\n", GLVersion.major, GLVersion.minor); + R_Printf(PRINT_ALL, "%s(): ERROR: glad only got GL version %d.%d!\n", + __func__, GLVersion.major, GLVersion.minor); return false; } diff --git a/src/client/refresh/gl4/gl4_sdl.c b/src/client/refresh/gl4/gl4_sdl.c index ada0dc6a..39e6678b 100644 --- a/src/client/refresh/gl4/gl4_sdl.c +++ b/src/client/refresh/gl4/gl4_sdl.c @@ -295,7 +295,8 @@ int GL4_InitContext(void* win) // Coders are stupid. if (win == NULL) { - Com_Error(ERR_FATAL, "R_InitContext() must not be called with NULL argument!"); + Com_Error(ERR_FATAL, "%s() must not be called with NULL argument!", + __func__); return false; } @@ -307,7 +308,8 @@ int GL4_InitContext(void* win) if(context == NULL) { - R_Printf(PRINT_ALL, "GL4_InitContext(): Creating OpenGL Context failed: %s\n", SDL_GetError()); + R_Printf(PRINT_ALL, "%s(): Creating OpenGL Context failed: %s\n", + __func__, SDL_GetError()); window = NULL; @@ -342,13 +344,15 @@ int GL4_InitContext(void* win) // Load GL pointrs through GLAD and check context. if( !gladLoadGLLoader((void *)SDL_GL_GetProcAddress)) { - R_Printf(PRINT_ALL, "GL4_InitContext(): ERROR: loading OpenGL function pointers failed!\n"); + R_Printf(PRINT_ALL, "%s(): ERROR: loading OpenGL function pointers failed!\n", + __func__); return false; } else if (GLVersion.major < 4 || (GLVersion.major == 4 && GLVersion.minor < 6)) { - R_Printf(PRINT_ALL, "GL4_InitContext(): ERROR: glad only got GL version %d.%d!\n", GLVersion.major, GLVersion.minor); + R_Printf(PRINT_ALL, "%s(): ERROR: glad only got GL version %d.%d!\n", + __func__, GLVersion.major, GLVersion.minor); return false; }