in src/dxapi/native/platform/platform.cpp [312:354]
NOINLINE static bool dbg_open_logfile(const char * fname, int flags)
{
if (-1 != dbgfile__) {
_close(dbgfile__);
}
dbgfile__ = _open(fname, O_APPEND | O_TEXT | O_WRONLY | O_TRUNC | flags, 00666);
#if defined(DEBUG) || defined(_DEBUG)
#define CONFIGURATION "Debug"
#else
#define CONFIGURATION "Release"
#endif
if (-1 != dbgfile__) {
#if DX_PLATFORM_WINDOWS
char exename[0x1000];
char libname[0x1000];
GetModuleFileNameA(NULL, exename, sizeof(exename));
exename[sizeof(exename) - 1] = '\0';
libname[0] = '\0';
GetModuleFileNameA(GetModuleHandleA(VER_INTERNALNAME_STR), libname, sizeof(libname));
libname[sizeof(libname) - 1] = '\0';
dbg_log(LOG_START_MSG "\n%s\n%s\n%s\n"
"Version : %s " CONFIGURATION "\n"
"Built : " __DATE__ " " __TIME__ "\n"
// "CLR ver.: " __CLR_VER "\n"
"MSC ver. : %u\n"
"PID : %u\n" HLINE, exename, GetCommandLineA(), libname,
VER_FILEVERSION_STR " " VER_BUILD_CONFIGURATION_STR, _MSC_FULL_VER,
dbg_get_pid());
#else
dbg_log(LOG_START_MSG "\n"
"Version : " CONFIGURATION "\n"
"Built : " __DATE__ " " __TIME__ "\n"
"PID : %u\n" HLINE,
dbg_get_pid());
#endif
}
return -1 != dbgfile__;
}