mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-20 13:59:57 +00:00
FIlesystem module memewmemw
This commit is contained in:
parent
8aeff6e84a
commit
b5fc1e4c5a
2 changed files with 5 additions and 6 deletions
|
|
@ -52,7 +52,7 @@ struct SDLRWIoContext{
|
|||
filename(filename)
|
||||
{
|
||||
if (!ops)
|
||||
throw Exception(Exception::SDLError, "Failed to open file: %s", SDL_GetError());
|
||||
crash(Exception::SDLError, "Failed to open file: %s", SDL_GetError());
|
||||
}
|
||||
|
||||
~SDLRWIoContext(){
|
||||
|
|
@ -117,7 +117,7 @@ static PHYSFS_Io *createSDLRWIo(const char *filename){
|
|||
try{
|
||||
ctx = new SDLRWIoContext(filename);
|
||||
}catch (const Exception &e){
|
||||
Debug() << "Failed mounting" << filename;
|
||||
crash(Exception::MEOW, "Failed mounting %s", filename);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -595,16 +595,16 @@ void FileSystem::openRead(OpenHandler &handler, const char *filename){
|
|||
}
|
||||
|
||||
if (data.physfsError)
|
||||
throw Exception(Exception::PHYSFSError, "PhysFS: %s", data.physfsError);
|
||||
crash(Exception::PHYSFSError, "PhysFS: %s", data.physfsError);
|
||||
|
||||
if (data.matchCount == 0)
|
||||
throw Exception(Exception::NoFileError, "%s", filename);
|
||||
crash(Exception::NoFileError, "%s", filename);
|
||||
}
|
||||
|
||||
void FileSystem::openReadRaw(SDL_IOStream* &stream, const char *filename){
|
||||
PHYSFS_File *handle = PHYSFS_openRead(filename);
|
||||
if (!handle)
|
||||
throw Exception(Exception::NoFileError, "%s", filename);
|
||||
crash(Exception::NoFileError, "%s", filename);
|
||||
|
||||
initReadOps(handle, stream);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@ public:
|
|||
|
||||
/* Circumvents extension supplementing */
|
||||
void openReadRaw(SDL_IOStream* &ops, const char *filename);
|
||||
//bool freeOnClose = false);
|
||||
|
||||
/* Does not perform extension supplementing */
|
||||
bool exists(const char *filename);
|
||||
|
|
|
|||
Loading…
Reference in a new issue