2018-02-22 12:36:24 +01:00
|
|
|
#include <physfs.h>
|
|
|
|
#include "physfsrwops.h"
|
|
|
|
#include "io_util.h"
|
|
|
|
#include "util.h"
|
|
|
|
|
|
|
|
SDL_RWops *
|
|
|
|
io_load_rwops(const char *path)
|
|
|
|
{
|
2018-02-22 13:02:40 +01:00
|
|
|
if (!PHYSFS_exists(path)) {
|
|
|
|
PHYSFS_ErrorCode code = PHYSFS_getLastErrorCode();
|
|
|
|
fatal("Unable to open file %s: (%d) %s", path, code, PHYSFS_getErrorByCode(code));
|
|
|
|
}
|
2018-02-22 12:36:24 +01:00
|
|
|
|
|
|
|
return PHYSFSRWOPS_openRead(path);
|
2018-02-22 13:02:40 +01:00
|
|
|
}
|