mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
Replace _access with SDL_GetPathInfo
This commit is contained in:
parent
6da70cf07e
commit
b64d8a5f46
@ -28,8 +28,8 @@
|
|||||||
#include "realtime/realtime.h"
|
#include "realtime/realtime.h"
|
||||||
#include "viewmanager/viewmanager.h"
|
#include "viewmanager/viewmanager.h"
|
||||||
|
|
||||||
|
#include <SDL3/SDL_filesystem.h>
|
||||||
#include <SDL3/SDL_stdinc.h>
|
#include <SDL3/SDL_stdinc.h>
|
||||||
#include <io.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <vec.h>
|
#include <vec.h>
|
||||||
|
|
||||||
@ -640,8 +640,9 @@ MxResult LegoAnimationManager::LoadWorldInfo(LegoOmni::World p_worldId)
|
|||||||
}
|
}
|
||||||
|
|
||||||
strcat(path, filename);
|
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());
|
sprintf(path, "%s", MxOmni::GetCD());
|
||||||
|
|
||||||
if (path[strlen(path) - 1] != '\\') {
|
if (path[strlen(path) - 1] != '\\') {
|
||||||
@ -650,7 +651,7 @@ MxResult LegoAnimationManager::LoadWorldInfo(LegoOmni::World p_worldId)
|
|||||||
|
|
||||||
strcat(path, filename);
|
strcat(path, filename);
|
||||||
|
|
||||||
if (_access(path, 4)) {
|
if (!SDL_GetPathInfo(path, &pathInfo) || pathInfo.type != SDL_PATHTYPE_FILE) {
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user