Skip to content

Commit

Permalink
Fix for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
dzhdanNV authored Aug 29, 2024
1 parent 5f7fd91 commit 5562b41
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/Shared/SharedExternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,19 @@ typedef uint32_t DXGI_FORMAT;

#define RETURN_ON_BAD_HRESULT(deviceBase, hr, format) \
if (FAILED(hr)) { \
(deviceBase)->ReportMessage(nri::Message::TYPE_ERROR, __FILE__, __LINE__, __FUNCTION__ ": " format " failed, result = 0x%08X!", hr); \
(deviceBase)->ReportMessage(nri::Message::TYPE_ERROR, __FILE__, __LINE__, "%s: " format " failed, result = 0x%08X!", __FUNCTION__, hr); \
return GetResultFromHRESULT(hr); \
}

#define RETURN_ON_FAILURE(deviceBase, condition, returnCode, format, ...) \
if (!(condition)) { \
(deviceBase)->ReportMessage(nri::Message::TYPE_ERROR, __FILE__, __LINE__, __FUNCTION__ ": " format, ##__VA_ARGS__); \
(deviceBase)->ReportMessage(nri::Message::TYPE_ERROR, __FILE__, __LINE__, "%s: " format, __FUNCTION__, ##__VA_ARGS__); \
return returnCode; \
}

#define REPORT_ERROR_ON_BAD_STATUS(deviceBase, expression) \
if ((expression) != 0) \
(deviceBase)->ReportMessage(nri::Message::TYPE_ERROR, __FILE__, __LINE__, __FUNCTION__ ": " NRI_STRINGIFY(expression) " failed!")
(deviceBase)->ReportMessage(nri::Message::TYPE_ERROR, __FILE__, __LINE__, "%s: " NRI_STRINGIFY(expression) " failed!", __FUNCTION__)

#define CHECK(condition, message) assert((condition) && message)

Expand Down

0 comments on commit 5562b41

Please sign in to comment.