From 5edd5a11fc16147ee25566db75732533005d1f46 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 17 Dec 2020 21:07:53 -0800 Subject: Don't use ALC error enums for the backend error code --- alc/backends/null.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'alc/backends/null.cpp') diff --git a/alc/backends/null.cpp b/alc/backends/null.cpp index 8a134a93..dd22a56b 100644 --- a/alc/backends/null.cpp +++ b/alc/backends/null.cpp @@ -111,7 +111,8 @@ void NullBackend::open(const ALCchar *name) if(!name) name = nullDevice; else if(strcmp(name, nullDevice) != 0) - throw al::backend_exception{ALC_INVALID_VALUE, "Device name \"%s\" not found", name}; + throw al::backend_exception{al::backend_error::NoDevice, "Device name \"%s\" not found", + name}; mDevice->DeviceName = name; } @@ -129,8 +130,8 @@ void NullBackend::start() mThread = std::thread{std::mem_fn(&NullBackend::mixerProc), this}; } catch(std::exception& e) { - throw al::backend_exception{ALC_INVALID_DEVICE, "Failed to start mixing thread: %s", - e.what()}; + throw al::backend_exception{al::backend_error::DeviceError, + "Failed to start mixing thread: %s", e.what()}; } } -- cgit v1.2.3