From b64d8a5f4616af8d524d50ae7322583ce96a2f26 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sat, 28 Dec 2024 00:41:03 +0100 Subject: [PATCH] Replace _access with SDL_GetPathInfo --- LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp index 2379b2d1..b6095308 100644 --- a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp @@ -28,8 +28,8 @@ #include "realtime/realtime.h" #include "viewmanager/viewmanager.h" +#include #include -#include #include #include @@ -640,8 +640,9 @@ MxResult LegoAnimationManager::LoadWorldInfo(LegoOmni::World p_worldId) } strcat(path, filename); + SDL_PathInfo pathInfo; - if (_access(path, 4)) { + if (!SDL_GetPathInfo(path, &pathInfo) || pathInfo.type != SDL_PATHTYPE_FILE) { sprintf(path, "%s", MxOmni::GetCD()); if (path[strlen(path) - 1] != '\\') { @@ -650,7 +651,7 @@ MxResult LegoAnimationManager::LoadWorldInfo(LegoOmni::World p_worldId) strcat(path, filename); - if (_access(path, 4)) { + if (!SDL_GetPathInfo(path, &pathInfo) || pathInfo.type != SDL_PATHTYPE_FILE) { goto done; } }