mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
update assimp lib
This commit is contained in:
parent
03a348deb7
commit
d3f8fee74e
1725 changed files with 196314 additions and 62009 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2022, assimp team
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -93,18 +93,24 @@ static std::string WideToUtf8(const wchar_t *in) {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Tests for the existence of a file at the given path.
|
||||
bool DefaultIOSystem::Exists(const char *pFile) const {
|
||||
if (pFile == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
struct __stat64 filestat;
|
||||
if (_wstat64(Utf8ToWide(pFile).c_str(), &filestat) != 0) {
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
FILE *file = ::fopen(pFile, "rb");
|
||||
if (!file) {
|
||||
struct stat statbuf;
|
||||
if (stat(pFile, &statbuf) != 0) {
|
||||
return false;
|
||||
}
|
||||
// test for a regular file
|
||||
if (!S_ISREG(statbuf.st_mode)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
::fclose(file);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
|
|
@ -116,6 +122,7 @@ IOStream *DefaultIOSystem::Open(const char *strFile, const char *strMode) {
|
|||
ai_assert(strFile != nullptr);
|
||||
ai_assert(strMode != nullptr);
|
||||
FILE *file;
|
||||
|
||||
#ifdef _WIN32
|
||||
std::wstring name = Utf8ToWide(strFile);
|
||||
if (name.empty()) {
|
||||
|
|
@ -126,6 +133,7 @@ IOStream *DefaultIOSystem::Open(const char *strFile, const char *strMode) {
|
|||
#else
|
||||
file = ::fopen(strFile, strMode);
|
||||
#endif
|
||||
|
||||
if (!file) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue