| 161 | } |
| 162 | |
| 163 | void Device::setAsyncError(Error code, const std::string& message) |
| 164 | { |
| 165 | // Update the stored async error only if the previous error was thrown |
| 166 | std::lock_guard<std::mutex> lock(asyncErrorMutex); |
| 167 | if (asyncError.code == Error::None) |
| 168 | { |
| 169 | asyncError.code = code; |
| 170 | asyncError.message = message; |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | void Device::setErrorFunction(ErrorFunction func, void* userPtr) |
| 175 | { |