- uncoupled directory loader from the rest of the engine.

This commit is contained in:
Christoph Oelckers 2023-08-19 09:24:33 +02:00
commit 219b3fb9f9
8 changed files with 429 additions and 54 deletions

View file

@ -33,18 +33,21 @@
**
*/
#include <string>
#include "files.h"
#include "utf8.h"
#include "stb_sprintf.h"
#ifdef _WIN32
std::wstring toWide(const char* str);
#endif
FILE *myfopen(const char *filename, const char *flags)
{
#ifndef _WIN32
return fopen(filename, flags);
#else
auto widename = WideString(filename);
auto wideflags = WideString(flags);
auto widename = toWide(filename);
auto wideflags = toWide(flags);
return _wfopen(widename.c_str(), wideflags.c_str());
#endif
}