mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
Fixes
This commit is contained in:
parent
622d41abcd
commit
49638b1d1c
@ -29,6 +29,7 @@
|
|||||||
#include "viewmanager/viewmanager.h"
|
#include "viewmanager/viewmanager.h"
|
||||||
|
|
||||||
#include <SDL3/SDL_filesystem.h>
|
#include <SDL3/SDL_filesystem.h>
|
||||||
|
#include <SDL3/SDL_messagebox.h>
|
||||||
#include <SDL3/SDL_stdinc.h>
|
#include <SDL3/SDL_stdinc.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <vec.h>
|
#include <vec.h>
|
||||||
@ -640,6 +641,8 @@ MxResult LegoAnimationManager::LoadWorldInfo(LegoOmni::World p_worldId)
|
|||||||
}
|
}
|
||||||
|
|
||||||
strcat(path, filename);
|
strcat(path, filename);
|
||||||
|
MxString::MapPathToFilesystem(path);
|
||||||
|
|
||||||
SDL_PathInfo pathInfo;
|
SDL_PathInfo pathInfo;
|
||||||
|
|
||||||
if (!SDL_GetPathInfo(path, &pathInfo) || pathInfo.type != SDL_PATHTYPE_FILE) {
|
if (!SDL_GetPathInfo(path, &pathInfo) || pathInfo.type != SDL_PATHTYPE_FILE) {
|
||||||
@ -650,8 +653,17 @@ MxResult LegoAnimationManager::LoadWorldInfo(LegoOmni::World p_worldId)
|
|||||||
}
|
}
|
||||||
|
|
||||||
strcat(path, filename);
|
strcat(path, filename);
|
||||||
|
MxString::MapPathToFilesystem(path);
|
||||||
|
|
||||||
if (!SDL_GetPathInfo(path, &pathInfo) || pathInfo.type != SDL_PATHTYPE_FILE) {
|
if (!SDL_GetPathInfo(path, &pathInfo) || pathInfo.type != SDL_PATHTYPE_FILE) {
|
||||||
|
char buffer[256];
|
||||||
|
SDL_snprintf(
|
||||||
|
buffer,
|
||||||
|
sizeof(buffer),
|
||||||
|
"\"LEGO® Island\" failed to load %s.\nPlease make sure this file is available on HD/CD.",
|
||||||
|
filename
|
||||||
|
);
|
||||||
|
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "LEGO® Island Error", buffer, NULL);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -128,14 +128,6 @@ LegoResult LegoFile::Open(const char* p_name, LegoU32 p_mode)
|
|||||||
path.MapPathToFilesystem();
|
path.MapPathToFilesystem();
|
||||||
|
|
||||||
if (!(m_file = SDL_IOFromFile(path.GetData(), mode))) {
|
if (!(m_file = SDL_IOFromFile(path.GetData(), mode))) {
|
||||||
char buffer[256];
|
|
||||||
SDL_snprintf(
|
|
||||||
buffer,
|
|
||||||
sizeof(buffer),
|
|
||||||
"\"LEGO® Island\" failed to load %s.\nPlease make sure this file is available on HD/CD.",
|
|
||||||
path.GetData()
|
|
||||||
);
|
|
||||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "LEGO® Island Error", buffer, NULL);
|
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user