Support ZynAddSubFx with MSVC (#6561)

This commit is contained in:
Dominic Clark
2023-01-02 23:42:46 +00:00
committed by GitHub
parent 79def0c3b5
commit d95c89760a
10 changed files with 120 additions and 135 deletions

View File

@@ -47,7 +47,7 @@ namespace lmms
#ifdef _WIN32
std::wstring toWString(const std::string& s)
inline std::wstring toWString(const std::string& s)
{
std::wstring ret;
int len = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, s.data(),
@@ -64,7 +64,7 @@ std::wstring toWString(const std::string& s)
#endif
FILE* F_OPEN_UTF8(std::string const& fname, const char* mode){
inline FILE* F_OPEN_UTF8(std::string const& fname, const char* mode){
#ifdef LMMS_BUILD_WIN32
return _wfopen(toWString(fname).data(), toWString(mode).data());
#else
@@ -73,7 +73,7 @@ FILE* F_OPEN_UTF8(std::string const& fname, const char* mode){
}
int fileToDescriptor(FILE* f, bool closeFile = true)
inline int fileToDescriptor(FILE* f, bool closeFile = true)
{
int fh;
if (f == nullptr) {return -1;}