diff options
author | Chris Robinson <[email protected]> | 2023-04-30 04:22:13 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-04-30 04:22:13 -0700 |
commit | b64b500c6b75aebb3b5d1c41206317f81636a21c (patch) | |
tree | 92271958a92c1b37b47a9ebb0d098aabee065661 /al | |
parent | 622ee190efffef9407ff63ffdbff6bbdbe0dce04 (diff) |
Improve some debug error handling
Diffstat (limited to 'al')
-rw-r--r-- | al/debug.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/al/debug.cpp b/al/debug.cpp index 5d01fda9..98c5a0b5 100644 --- a/al/debug.cpp +++ b/al/debug.cpp @@ -120,13 +120,13 @@ FORCE_ALIGN void AL_APIENTRY alDebugMessageControlSOFT(ALenum source, ALenum typ if(!ids) return context->setError(AL_INVALID_VALUE, "IDs is null with non-0 count"); if(source == AL_DONT_CARE_SOFT) - return context->setError(AL_INVALID_VALUE, + return context->setError(AL_INVALID_OPERATION, "Debug source cannot be AL_DONT_CARE_SOFT with IDs"); if(type == AL_DONT_CARE_SOFT) - return context->setError(AL_INVALID_VALUE, + return context->setError(AL_INVALID_OPERATION, "Debug type cannot be AL_DONT_CARE_SOFT with IDs"); if(severity != AL_DONT_CARE_SOFT) - return context->setError(AL_INVALID_VALUE, + return context->setError(AL_INVALID_OPERATION, "Debug severity must be AL_DONT_CARE_SOFT with IDs"); return context->setError(AL_INVALID_VALUE, "Debug ID filtering not supported"); @@ -134,7 +134,7 @@ FORCE_ALIGN void AL_APIENTRY alDebugMessageControlSOFT(ALenum source, ALenum typ } if(enable != AL_TRUE && enable != AL_FALSE) - return context->setError(AL_INVALID_VALUE, "Invalid debug enable %d", enable); + return context->setError(AL_INVALID_ENUM, "Invalid debug enable %d", enable); static constexpr size_t ElemCount{DebugSourceCount + DebugTypeCount + DebugSeverityCount}; static constexpr auto Values = make_array<uint,ElemCount>(); |