Closed cxhawk closed 1 year ago
I added the following util method and replace all fopen with this:
FILE tag_openFile(const char filename, const char* mode) {
WCHAR nameBuffer[256]; memset(nameBuffer, 0, 256*2); MultiByteToWideChar(CP_UTF8, 0, filename, -1, nameBuffer, 256*2); WCHAR modeBuffer[256]; memset(modeBuffer, 0, 256*2); MultiByteToWideChar(CP_UTF8, 0, mode, -1, modeBuffer, 256*2); return _wfopen(nameBuffer, modeBuffer);
return fopen(filename, mode);
}
I added the following util method and replace all fopen with this:
ifdef _WINDOWS
include
endif
FILE tag_openFile(const char filename, const char* mode) {
ifdef _WINDOWS
else
endif
}