Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[client] Hide renderer warnings behind developer cvar (#1407) #1468

Conversation

Exagone313
Copy link
Contributor

@Exagone313 Exagone313 commented May 13, 2020

Fixes #1407

Com_DPrintf here is the one defined in qcommon/common.c which checks for developer cvar.

CL_RefPrintf is passed to the renderer which calls it via Ren_Warning

$ rg CL_RefPrintf src
src/client/cl_main.c
2462: * @brief CL_RefPrintf
2469:static __attribute__ ((format(printf, 2, 3))) void QDECL CL_RefPrintf(int print_level, const char *fmt, ...)
2673:	ri.Printf                  = CL_RefPrintf;
$ rg Ren_Warning src/renderercommon
(...)
src/renderercommon/tr_common.h
84:#define Ren_Warning(...) ri.Printf(PRINT_WARNING, __VA_ARGS__)
(...)

@ensiform
Copy link
Contributor

ensiform commented May 13, 2020

You do know there's a separate developer print flag for ri.Printf right below that one? PRINT_DEVELOPER

IMHO hiding all renderer warnings behind developer is not the best idea.

@Exagone313
Copy link
Contributor Author

Then I would suggest adding a cvar for displaying these warnings, off by default?

@Exagone313
Copy link
Contributor Author

Let's close this for now.

@Exagone313 Exagone313 closed this Jul 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

move warning prints in console to developer mode only
2 participants