Commit a611cf5f authored by David Reid's avatar David Reid

Add ma_device_id_equal().

parent d726e853
...@@ -7020,6 +7020,8 @@ typedef union ...@@ -7020,6 +7020,8 @@ typedef union
int nullbackend; /* The null backend uses an integer for device IDs. */ int nullbackend; /* The null backend uses an integer for device IDs. */
} ma_device_id; } ma_device_id;
MA_API ma_bool32 ma_device_id_equal(const ma_device_id* pA, const ma_device_id* pB);
typedef struct ma_context_config ma_context_config; typedef struct ma_context_config ma_context_config;
typedef struct ma_device_config ma_device_config; typedef struct ma_device_config ma_device_config;
...@@ -41416,6 +41418,24 @@ MA_API ma_result ma_device_job_thread_next(ma_device_job_thread* pJobThread, ma_ ...@@ -41416,6 +41418,24 @@ MA_API ma_result ma_device_job_thread_next(ma_device_job_thread* pJobThread, ma_
} }
MA_API ma_bool32 ma_device_id_equal(const ma_device_id* pA, const ma_device_id* pB)
{
size_t i;
if (pA == NULL || pB == NULL) {
return MA_FALSE;
}
for (i = 0; i < sizeof(ma_device_id); i += 1) {
if (((const char*)pA)[i] != ((const char*)pB)[i]) {
return MA_FALSE;
}
}
return MA_TRUE;
}
MA_API ma_context_config ma_context_config_init(void) MA_API ma_context_config ma_context_config_init(void)
{ {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment