improve quiet mode for SD

This commit is contained in:
Concedo 2024-03-12 20:50:39 +08:00
parent 60d234550b
commit 88705cb89a
3 changed files with 10 additions and 1 deletions

View file

@ -208,11 +208,12 @@ std::string path_join(const std::string& p1, const std::string& p2) {
}
static int sdloglevel = 0; //-1 = hide all, 0 = normal, 1 = showall
static bool sdquiet = false;
void pretty_progress(int step, int steps, float time) {
if (step == 0) {
return;
}
if(sdloglevel<0)
if(sdloglevel<0 || sdquiet)
{
return;
}
@ -279,6 +280,10 @@ bool get_sd_log_level()
{
return sdloglevel;
}
void set_sd_quiet(bool quiet)
{
sdquiet = quiet;
}
void log_printf(sd_log_level_t level, const char* file, int line, const char* format, ...) {
va_list args;