0
0

Since FMOD Ex (and FMOD 3, but that’s irrelavant) take char* parameters for filename, how would I pass a Unicode filename to FMOD? I don’t need the functionality for actual internationalization, but it would be helpful when compiling Windows programs…

Here’s the thing. When the UNICODE macro is defined, TCHAR becomes a wchar_t instead of a char, and all Windows APIs then take wchar_t* for their string parameters. For best compatibility with this, all my string buffers are defined as TCHAR[]. Problem is, you can’t pass a wchar_t* to FMOD, so the FMOD calls won’t compile if I define UNICODE.

  • You must to post comments
0
0

reinterpret_cast<char*>(ptr)
?

  • You must to post comments
0
0

Not a very elegant solution, but I suppose it works. I’m thinking maybe FMOD should check if the UNICODE macro is defined and behave accordingly, at least under the Windows platform? That’s how the Windows API headers are set up, anyway.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.