Commit 537a27de authored by David Reid's avatar David Reid

Minor changes to ma_wfopen().

parent f9032c55
...@@ -6841,12 +6841,8 @@ fallback, so if you notice your compiler not detecting this properly I'm happy t ...@@ -6841,12 +6841,8 @@ fallback, so if you notice your compiler not detecting this properly I'm happy t
#endif #endif
#endif #endif
MA_API ma_result ma_wfopen(FILE** ppFile, const wchar_t* pFilePath, const wchar_t* pOpenMode, ma_allocation_callbacks* pAllocationCallbacks) MA_API ma_result ma_wfopen(FILE** ppFile, const wchar_t* pFilePath, const wchar_t* pOpenMode, const ma_allocation_callbacks* pAllocationCallbacks)
{ {
#if _MSC_VER && _MSC_VER >= 1400
errno_t err;
#endif
if (ppFile != NULL) { if (ppFile != NULL) {
*ppFile = NULL; /* Safety. */ *ppFile = NULL; /* Safety. */
} }
...@@ -6856,7 +6852,10 @@ MA_API ma_result ma_wfopen(FILE** ppFile, const wchar_t* pFilePath, const wchar_ ...@@ -6856,7 +6852,10 @@ MA_API ma_result ma_wfopen(FILE** ppFile, const wchar_t* pFilePath, const wchar_
} }
#if defined(MA_HAS_WFOPEN) #if defined(MA_HAS_WFOPEN)
(void)pAllocationCallbacks; {
errno_t err;
(void)pAllocationCallbacks;
/* Use _wfopen() on Windows. */ /* Use _wfopen() on Windows. */
#if defined(_MSC_VER) && _MSC_VER >= 1400 #if defined(_MSC_VER) && _MSC_VER >= 1400
...@@ -6870,6 +6869,7 @@ MA_API ma_result ma_wfopen(FILE** ppFile, const wchar_t* pFilePath, const wchar_ ...@@ -6870,6 +6869,7 @@ MA_API ma_result ma_wfopen(FILE** ppFile, const wchar_t* pFilePath, const wchar_
return ma_result_from_errno(errno); return ma_result_from_errno(errno);
} }
#endif #endif
}
#else #else
/* /*
Use fopen() on anything other than Windows. Requires a conversion. This is annoying because fopen() is locale specific. The only real way I can Use fopen() on anything other than Windows. Requires a conversion. This is annoying because fopen() is locale specific. The only real way I can
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