diff options
-rw-r--r-- | alc/alc.cpp | 6 | ||||
-rw-r--r-- | alc/helpers.cpp | 1 | ||||
-rw-r--r-- | alc/logging.h | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp index 2b9c9ce6..2b43ebf5 100644 --- a/alc/alc.cpp +++ b/alc/alc.cpp @@ -976,7 +976,11 @@ void alc_initconfig(void) if(auto loglevel = al::getenv("ALSOFT_LOGLEVEL")) { long lvl = strtol(loglevel->c_str(), nullptr, 0); - if(lvl >= static_cast<long>(LogLevel::Disable) && lvl <= static_cast<long>(LogLevel::Ref)) + if(lvl >= static_cast<long>(LogLevel::Trace)) + gLogLevel = LogLevel::Trace; + else if(lvl <= static_cast<long>(LogLevel::Disable)) + gLogLevel = LogLevel::Disable; + else gLogLevel = static_cast<LogLevel>(lvl); } diff --git a/alc/helpers.cpp b/alc/helpers.cpp index 369ab9f1..ce407756 100644 --- a/alc/helpers.cpp +++ b/alc/helpers.cpp @@ -356,7 +356,6 @@ void al_print(LogLevel level, FILE *logfile, const char *fmt, ...) case LogLevel::Warning: return ANDROID_LOG_WARN; case LogLevel::Error: return ANDROID_LOG_ERROR; /* Should not happen. */ - case LogLevel::Ref: case LogLevel::Disable: break; } diff --git a/alc/logging.h b/alc/logging.h index 4b015814..32a877e1 100644 --- a/alc/logging.h +++ b/alc/logging.h @@ -10,8 +10,7 @@ enum class LogLevel { Disable, Error, Warning, - Trace, - Ref + Trace }; extern LogLevel gLogLevel; |