mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
Start using VFS API constant defines
This commit is contained in:
parent
93ee4df5f5
commit
318f17c4cb
@ -2641,7 +2641,7 @@ static int cheevos_iterate(coro_t* coro)
|
||||
if (!CHEEVOS_VAR_DATA)
|
||||
{
|
||||
CHEEVOS_VAR_STREAM = filestream_open(CHEEVOS_VAR_PATH,
|
||||
RFILE_MODE_READ, RFILE_HINT_NONE);
|
||||
RETRO_VFS_FILE_ACCESS_READ, RFILE_HINT_NONE);
|
||||
|
||||
if (!CHEEVOS_VAR_STREAM)
|
||||
CORO_STOP();
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include <libretro.h>
|
||||
#include <file/config_file.h>
|
||||
#include <file/file_path.h>
|
||||
#include <compat/strl.h>
|
||||
@ -3792,17 +3793,17 @@ bool config_save_file(const char *path)
|
||||
#ifdef HAVE_LAKKA
|
||||
if (settings->bools.ssh_enable)
|
||||
filestream_close(filestream_open(LAKKA_SSH_PATH,
|
||||
RFILE_MODE_WRITE, RFILE_HINT_NONE));
|
||||
RETRO_VFS_FILE_ACCESS_WRITE, RFILE_HINT_NONE));
|
||||
else
|
||||
path_file_remove(LAKKA_SSH_PATH);
|
||||
if (settings->bools.samba_enable)
|
||||
filestream_close(filestream_open(LAKKA_SAMBA_PATH,
|
||||
RFILE_MODE_WRITE, RFILE_HINT_NONE));
|
||||
RETRO_VFS_FILE_ACCESS_WRITE, RFILE_HINT_NONE));
|
||||
else
|
||||
path_file_remove(LAKKA_SAMBA_PATH);
|
||||
if (settings->bools.bluetooth_enable)
|
||||
filestream_close(filestream_open(LAKKA_BLUETOOTH_PATH,
|
||||
RFILE_MODE_WRITE, RFILE_HINT_NONE));
|
||||
RETRO_VFS_FILE_ACCESS_WRITE, RFILE_HINT_NONE));
|
||||
else
|
||||
path_file_remove(LAKKA_BLUETOOTH_PATH);
|
||||
#endif
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <gccore.h>
|
||||
#include <ogcsys.h>
|
||||
|
||||
#include <libretro.h>
|
||||
#include <streams/file_stream.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@ -719,7 +720,8 @@ static void gx_efb_screenshot(void)
|
||||
{
|
||||
int x, y;
|
||||
uint8_t tga_header[] = {0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0xE0, 0x01, 0x18, 0x00};
|
||||
RFILE *out = filestream_open("/screenshot.tga", RFILE_MODE_WRITE, RFILE_HINT_NONE);
|
||||
RFILE *out = filestream_open("/screenshot.tga",
|
||||
RETRO_VFS_FILE_ACCESS_WRITE, RFILE_HINT_NONE);
|
||||
|
||||
if (!out)
|
||||
return;
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <libretro.h>
|
||||
#include <compat/posix_string.h>
|
||||
#include <compat/msvc.h>
|
||||
#include <compat/strl.h>
|
||||
@ -545,7 +546,8 @@ bool video_shader_resolve_parameters(config_file_t *conf,
|
||||
/* If that doesn't work, fallback to the old path.
|
||||
* Ideally, we'd get rid of this path sooner or later. */
|
||||
#endif
|
||||
file = filestream_open(path, RFILE_MODE_READ, RFILE_HINT_NONE);
|
||||
file = filestream_open(path,
|
||||
RETRO_VFS_FILE_ACCESS_READ, RFILE_HINT_NONE);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
|
@ -321,7 +321,7 @@ static unsigned char check_arm_cpu_feature(const char* feature)
|
||||
char line[1024];
|
||||
unsigned char status = 0;
|
||||
RFILE *fp = filestream_open("/proc/cpuinfo",
|
||||
RFILE_MODE_READ, RFILE_HINT_NONE);
|
||||
RETRO_VFS_FILE_ACCESS_READ, RFILE_HINT_NONE);
|
||||
|
||||
if (!fp)
|
||||
return 0;
|
||||
|
@ -355,7 +355,7 @@ static config_file_t *config_file_new_internal(
|
||||
|
||||
conf->include_depth = depth;
|
||||
file = filestream_open(path,
|
||||
RFILE_MODE_READ, RFILE_HINT_NONE);
|
||||
RETRO_VFS_FILE_ACCESS_READ, RFILE_HINT_NONE);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
|
@ -28,6 +28,7 @@
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <libretro.h>
|
||||
#include <boolean.h>
|
||||
#include <file/file_path.h>
|
||||
#include <streams/file_stream.h>
|
||||
@ -410,7 +411,8 @@ bool path_file_exists(const char *path)
|
||||
if (!path || !*path)
|
||||
return false;
|
||||
|
||||
dummy = filestream_open(path, RFILE_MODE_READ, RFILE_HINT_NONE);
|
||||
dummy = filestream_open(path,
|
||||
RETRO_VFS_FILE_ACCESS_READ, RFILE_HINT_NONE);
|
||||
|
||||
if (!dummy)
|
||||
return false;
|
||||
|
@ -215,7 +215,8 @@ bool rbmp_save_image(
|
||||
unsigned pitch, enum rbmp_source_type type)
|
||||
{
|
||||
bool ret = false;
|
||||
RFILE *file = filestream_open(filename, RFILE_MODE_WRITE, RFILE_HINT_NONE);
|
||||
RFILE *file = filestream_open(filename,
|
||||
RETRO_VFS_FILE_ACCESS_WRITE, RFILE_HINT_NONE);
|
||||
if (!file)
|
||||
return false;
|
||||
|
||||
|
@ -227,7 +227,8 @@ static bool rpng_save_image(const char *path,
|
||||
void *stream = NULL;
|
||||
uint32_t total_in = 0;
|
||||
uint32_t total_out = 0;
|
||||
RFILE *file = filestream_open(path, RFILE_MODE_WRITE, RFILE_HINT_NONE);
|
||||
RFILE *file = filestream_open(path,
|
||||
RETRO_VFS_FILE_ACCESS_WRITE, RFILE_HINT_NONE);
|
||||
if (!file)
|
||||
GOTO_END_ERROR();
|
||||
|
||||
|
@ -419,7 +419,8 @@ rxml_document_t *rxml_load_document(const char *path)
|
||||
char *new_memory_buffer = NULL;
|
||||
const char *mem_ptr = NULL;
|
||||
long len = 0;
|
||||
RFILE *file = filestream_open(path, RFILE_MODE_READ, RFILE_HINT_NONE);
|
||||
RFILE *file = filestream_open(path,
|
||||
RETRO_VFS_FILE_ACCESS_READ, RFILE_HINT_NONE);
|
||||
if (!file)
|
||||
return NULL;
|
||||
|
||||
|
@ -511,7 +511,8 @@ int sha1_calculate(const char *path, char *result)
|
||||
SHA1Context sha;
|
||||
unsigned char buff[4096];
|
||||
int rv = 1;
|
||||
RFILE *fd = filestream_open(path, RFILE_MODE_READ, RFILE_HINT_NONE);
|
||||
RFILE *fd = filestream_open(path,
|
||||
RETRO_VFS_FILE_ACCESS_READ, RFILE_HINT_NONE);
|
||||
|
||||
if (!fd)
|
||||
goto error;
|
||||
|
@ -1044,6 +1044,13 @@ struct retro_hw_render_context_negotiation_interface
|
||||
* recognize or support. Should be set in either retro_init or retro_load_game, but not both.
|
||||
*/
|
||||
|
||||
/* File open flags
|
||||
* Introduced in VFS API v1 */
|
||||
#define RETRO_VFS_FILE_ACCESS_READ (1 << 0) /* Read only mode */
|
||||
#define RETRO_VFS_FILE_ACCESS_WRITE (1 << 1) /* Write only mode, discard contents and overwrites existing file unless RETRO_VFS_FILE_ACCESS_UPDATE is also specified */
|
||||
#define RETRO_VFS_FILE_ACCESS_READ_WRITE (RETRO_VFS_FILE_ACCESS_READ | RETRO_VFS_FILE_ACCESS_WRITE) /* Read-write mode, discard contents and overwrites existing file unless RETRO_VFS_FILE_ACCESS_UPDATE is also specified*/
|
||||
#define RETRO_VFS_FILE_ACCESS_UPDATE_EXISTING (1 << 2) /* Prevents discarding content of existing files opened for writing */
|
||||
|
||||
|
||||
#define RETRO_MEMDESC_CONST (1 << 0) /* The frontend will never change this memory area once retro_load_game has returned. */
|
||||
#define RETRO_MEMDESC_BIGENDIAN (1 << 1) /* The memory area contains big endian data. Default is little endian. */
|
||||
|
@ -30,6 +30,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <libretro.h>
|
||||
#include <retro_common_api.h>
|
||||
#include <retro_inline.h>
|
||||
#include <boolean.h>
|
||||
@ -40,16 +41,11 @@ RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct RFILE RFILE;
|
||||
|
||||
#define RFILE_HINT_NONE (0)
|
||||
/* requires RFILE_MODE_READ */
|
||||
#define RFILE_HINT_MMAP (1 << 9)
|
||||
#define FILESTREAM_REQUIRED_VFS_VERSION 1
|
||||
|
||||
enum
|
||||
{
|
||||
RFILE_MODE_READ = 0,
|
||||
RFILE_MODE_WRITE,
|
||||
RFILE_MODE_READ_WRITE
|
||||
};
|
||||
#define RFILE_HINT_NONE (0)
|
||||
/* requires RETRO_VFS_FILE_ACCESS_READ */
|
||||
#define RFILE_HINT_MMAP (1 << 9)
|
||||
|
||||
int64_t filestream_get_size(RFILE *stream);
|
||||
|
||||
|
@ -164,7 +164,7 @@ RFILE *filestream_open(const char *path, unsigned mode, unsigned hints)
|
||||
stream->hints = hints;
|
||||
|
||||
#ifdef HAVE_MMAP
|
||||
if (stream->hints & RFILE_HINT_MMAP && mode == RFILE_MODE_READ)
|
||||
if (stream->hints & RFILE_HINT_MMAP && mode == RETRO_VFS_FILE_ACCESS_READ)
|
||||
stream->hints |= RFILE_HINT_UNBUFFERED;
|
||||
else
|
||||
#endif
|
||||
@ -172,13 +172,13 @@ RFILE *filestream_open(const char *path, unsigned mode, unsigned hints)
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case RFILE_MODE_READ:
|
||||
case RETRO_VFS_FILE_ACCESS_READ:
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
mode_str = MODE_STR_READ_UNBUF;
|
||||
/* No "else" here */
|
||||
flags = O_RDONLY;
|
||||
break;
|
||||
case RFILE_MODE_WRITE:
|
||||
case RETRO_VFS_FILE_ACCESS_WRITE:
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
mode_str = MODE_STR_WRITE_UNBUF;
|
||||
else
|
||||
@ -189,7 +189,7 @@ RFILE *filestream_open(const char *path, unsigned mode, unsigned hints)
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case RFILE_MODE_READ_WRITE:
|
||||
case RETRO_VFS_FILE_ACCESS_READ_WRITE:
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
mode_str = MODE_STR_WRITE_PLUS;
|
||||
else
|
||||
@ -200,6 +200,9 @@ RFILE *filestream_open(const char *path, unsigned mode, unsigned hints)
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
/* TODO/FIXME - implement */
|
||||
case RETRO_VFS_FILE_ACCESS_UPDATE_EXISTING:
|
||||
break;
|
||||
}
|
||||
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0 && mode_str)
|
||||
@ -550,7 +553,7 @@ int filestream_read_file(const char *path, void **buf, ssize_t *len)
|
||||
ssize_t content_buf_size = 0;
|
||||
void *content_buf = NULL;
|
||||
RFILE *file = filestream_open(path,
|
||||
RFILE_MODE_READ, RFILE_HINT_NONE);
|
||||
RETRO_VFS_FILE_ACCESS_READ, RFILE_HINT_NONE);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
@ -616,7 +619,8 @@ error:
|
||||
bool filestream_write_file(const char *path, const void *data, ssize_t size)
|
||||
{
|
||||
ssize_t ret = 0;
|
||||
RFILE *file = filestream_open(path, RFILE_MODE_WRITE, RFILE_HINT_NONE);
|
||||
RFILE *file = filestream_open(path,
|
||||
RETRO_VFS_FILE_ACCESS_WRITE, RFILE_HINT_NONE);
|
||||
if (!file)
|
||||
return false;
|
||||
|
||||
|
@ -19,22 +19,23 @@
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <streams/file_stream.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <libretro.h>
|
||||
#include <streams/file_stream.h>
|
||||
|
||||
RFILE* rfopen(const char *path, const char *mode)
|
||||
{
|
||||
unsigned int retro_mode = 0;
|
||||
if (strstr(mode, "r"))
|
||||
if (strstr(mode, "b"))
|
||||
retro_mode = RFILE_MODE_READ;
|
||||
retro_mode = RETRO_VFS_FILE_ACCESS_READ;
|
||||
|
||||
if (strstr(mode, "w"))
|
||||
retro_mode = RFILE_MODE_WRITE;
|
||||
retro_mode = RETRO_VFS_FILE_ACCESS_WRITE;
|
||||
if (strstr(mode, "+"))
|
||||
retro_mode = RFILE_MODE_READ_WRITE;
|
||||
retro_mode = RETRO_VFS_FILE_ACCESS_READ_WRITE;
|
||||
|
||||
return filestream_open(path, retro_mode, -1);
|
||||
}
|
||||
|
@ -804,7 +804,8 @@ int main(int argc, char** argv)
|
||||
dat_buffer++;
|
||||
}
|
||||
|
||||
rdb_file = filestream_open(rdb_path, RFILE_MODE_WRITE, RFILE_HINT_NONE);
|
||||
rdb_file = filestream_open(rdb_path,
|
||||
RETRO_VFS_FILE_ACCESS_WRITE, RFILE_HINT_NONE);
|
||||
|
||||
if (!rdb_file)
|
||||
{
|
||||
|
@ -216,8 +216,9 @@ int libretrodb_open(const char *path, libretrodb_t *db)
|
||||
{
|
||||
libretrodb_header_t header;
|
||||
libretrodb_metadata_t md;
|
||||
int rv;
|
||||
RFILE *fd = filestream_open(path, RFILE_MODE_READ, RFILE_HINT_NONE);
|
||||
int rv = 0;
|
||||
RFILE *fd = filestream_open(path,
|
||||
RETRO_VFS_FILE_ACCESS_READ, RFILE_HINT_NONE);
|
||||
|
||||
if (!fd)
|
||||
return -errno;
|
||||
@ -428,18 +429,21 @@ void libretrodb_cursor_close(libretrodb_cursor_t *cursor)
|
||||
int libretrodb_cursor_open(libretrodb_t *db, libretrodb_cursor_t *cursor,
|
||||
libretrodb_query_t *q)
|
||||
{
|
||||
RFILE *fd = NULL;
|
||||
if (!db || string_is_empty(db->path))
|
||||
return -errno;
|
||||
|
||||
cursor->fd = filestream_open(db->path, RFILE_MODE_READ, RFILE_HINT_MMAP);
|
||||
fd = filestream_open(db->path,
|
||||
RETRO_VFS_FILE_ACCESS_READ, RFILE_HINT_MMAP);
|
||||
|
||||
if (!cursor->fd)
|
||||
if (!fd)
|
||||
return -errno;
|
||||
|
||||
cursor->db = db;
|
||||
cursor->fd = fd;
|
||||
cursor->db = db;
|
||||
cursor->is_valid = 1;
|
||||
libretrodb_cursor_reset(cursor);
|
||||
cursor->query = q;
|
||||
cursor->query = q;
|
||||
|
||||
if (q)
|
||||
libretrodb_query_inc_ref(q);
|
||||
|
@ -92,7 +92,8 @@ int main(int argc, char ** argv)
|
||||
|
||||
call_init(L, argc - 2, (const char **) argv + 2);
|
||||
|
||||
dst = filestream_open(db_file, RFILE_MODE_WRITE, RFILE_HINT_NONE);
|
||||
dst = filestream_open(db_file,
|
||||
RETRO_VFS_FILE_ACCESS_WRITE, RFILE_HINT_NONE);
|
||||
|
||||
if (!dst)
|
||||
{
|
||||
|
@ -106,7 +106,8 @@ static int create_db(lua_State *L)
|
||||
}
|
||||
lua_setfield(L, LUA_REGISTRYINDEX, "testlib_get_value");
|
||||
|
||||
dst = filestream_open(db_file, RFILE_MODE_WRITE, RFILE_HINT_NONE);
|
||||
dst = filestream_open(db_file,
|
||||
RETRO_VFS_FILE_ACCESS_WRITE, RFILE_HINT_NONE);
|
||||
if (!dst)
|
||||
{
|
||||
lua_pushstring(L, "Could not open destination file");
|
||||
|
@ -186,9 +186,10 @@ static struct rmsgpack_read_callbacks stub_callbacks = {
|
||||
int main(void)
|
||||
{
|
||||
struct stub_state state;
|
||||
RFILE *fd = filestream_open("test.msgpack", RFILE_MODE_READ, RFILE_HINT_NONE);
|
||||
RFILE *fd = filestream_open("test.msgpack",
|
||||
RETRO_VFS_FILE_ACCESS_READ, RFILE_HINT_NONE);
|
||||
|
||||
state.i = 0;
|
||||
state.i = 0;
|
||||
state.stack[0] = 0;
|
||||
|
||||
rmsgpack_read(fd, &stub_callbacks, &state);
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <libretro.h>
|
||||
#include <lists/file_list.h>
|
||||
#include <file/file_path.h>
|
||||
#include <string/stdstring.h>
|
||||
@ -1877,7 +1878,7 @@ static void systemd_service_toggle(const char *path, char *unit, bool enable)
|
||||
|
||||
if (enable)
|
||||
filestream_close(filestream_open(path,
|
||||
RFILE_MODE_WRITE, RFILE_HINT_NONE));
|
||||
RETRO_VFS_FILE_ACCESS_WRITE, RFILE_HINT_NONE));
|
||||
else
|
||||
path_file_remove(path);
|
||||
|
||||
|
6
movie.c
6
movie.c
@ -75,7 +75,8 @@ static bool bsv_movie_init_playback(bsv_movie_t *handle, const char *path)
|
||||
uint32_t state_size = 0;
|
||||
uint32_t content_crc = 0;
|
||||
uint32_t header[4] = {0};
|
||||
RFILE *file = filestream_open(path, RFILE_MODE_READ, RFILE_HINT_NONE);
|
||||
RFILE *file = filestream_open(path,
|
||||
RETRO_VFS_FILE_ACCESS_READ, RFILE_HINT_NONE);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
@ -152,7 +153,8 @@ static bool bsv_movie_init_record(bsv_movie_t *handle, const char *path)
|
||||
uint32_t state_size = 0;
|
||||
uint32_t content_crc = 0;
|
||||
uint32_t header[4] = {0};
|
||||
RFILE *file = filestream_open(path, RFILE_MODE_WRITE, RFILE_HINT_NONE);
|
||||
RFILE *file = filestream_open(path,
|
||||
RETRO_VFS_FILE_ACCESS_WRITE, RFILE_HINT_NONE);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <libretro.h>
|
||||
#include <boolean.h>
|
||||
#include <compat/posix_string.h>
|
||||
#include <string/stdstring.h>
|
||||
@ -394,7 +395,7 @@ void playlist_write_file(playlist_t *playlist)
|
||||
return;
|
||||
|
||||
file = filestream_open(playlist->conf_path,
|
||||
RFILE_MODE_WRITE, RFILE_HINT_NONE);
|
||||
RETRO_VFS_FILE_ACCESS_WRITE, RFILE_HINT_NONE);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
@ -494,7 +495,7 @@ static bool playlist_read_file(
|
||||
unsigned i;
|
||||
char buf[PLAYLIST_ENTRIES][1024];
|
||||
RFILE *file = filestream_open(
|
||||
path, RFILE_MODE_READ, RFILE_HINT_NONE);
|
||||
path, RETRO_VFS_FILE_ACCESS_READ, RFILE_HINT_NONE);
|
||||
|
||||
for (i = 0; i < PLAYLIST_ENTRIES; i++)
|
||||
buf[i][0] = '\0';
|
||||
|
@ -101,7 +101,7 @@ static intfstream_t* intfstream_open_file(const char *path)
|
||||
if (!fd)
|
||||
return NULL;
|
||||
|
||||
if (!intfstream_open(fd, path, RFILE_MODE_READ, RFILE_HINT_NONE))
|
||||
if (!intfstream_open(fd, path, RETRO_VFS_FILE_ACCESS_READ, RFILE_HINT_NONE))
|
||||
goto error;
|
||||
|
||||
return fd;
|
||||
@ -130,7 +130,7 @@ static intfstream_t *open_memory(void *data, size_t size)
|
||||
if (!fd)
|
||||
return NULL;
|
||||
|
||||
if (!intfstream_open(fd, NULL, RFILE_MODE_READ, RFILE_HINT_NONE))
|
||||
if (!intfstream_open(fd, NULL, RETRO_VFS_FILE_ACCESS_READ, RFILE_HINT_NONE))
|
||||
goto error;
|
||||
|
||||
return fd;
|
||||
@ -158,7 +158,8 @@ open_chd_track(const char *path, int32_t track)
|
||||
if (!fd)
|
||||
return NULL;
|
||||
|
||||
if (!intfstream_open(fd, path, RFILE_MODE_READ, RFILE_HINT_NONE))
|
||||
if (!intfstream_open(fd, path,
|
||||
RETRO_VFS_FILE_ACCESS_READ, RFILE_HINT_NONE))
|
||||
goto error;
|
||||
|
||||
return fd;
|
||||
|
@ -413,7 +413,8 @@ clean:
|
||||
static ssize_t get_file_size(const char *path)
|
||||
{
|
||||
ssize_t rv;
|
||||
RFILE *fd = filestream_open(path, RFILE_MODE_READ, RFILE_HINT_NONE);
|
||||
RFILE *fd = filestream_open(path,
|
||||
RETRO_VFS_FILE_ACCESS_READ, RFILE_HINT_NONE);
|
||||
if (fd == NULL)
|
||||
return -1;
|
||||
rv = filestream_get_size(fd);
|
||||
@ -467,7 +468,8 @@ int cue_find_track(const char *cue_path, bool first,
|
||||
if (!fd)
|
||||
goto error;
|
||||
|
||||
if (!intfstream_open(fd, cue_path, RFILE_MODE_READ, RFILE_HINT_NONE))
|
||||
if (!intfstream_open(fd, cue_path,
|
||||
RETRO_VFS_FILE_ACCESS_READ, RFILE_HINT_NONE))
|
||||
{
|
||||
RARCH_LOG("Could not open CUE file '%s': %s\n", cue_path,
|
||||
strerror(errno));
|
||||
@ -621,7 +623,8 @@ int gdi_find_track(const char *gdi_path, bool first,
|
||||
if (!fd)
|
||||
goto error;
|
||||
|
||||
if (!intfstream_open(fd, gdi_path, RFILE_MODE_READ, RFILE_HINT_NONE))
|
||||
if (!intfstream_open(fd, gdi_path,
|
||||
RETRO_VFS_FILE_ACCESS_READ, RFILE_HINT_NONE))
|
||||
{
|
||||
RARCH_LOG("Could not open GDI file '%s': %s\n", gdi_path,
|
||||
strerror(errno));
|
||||
|
@ -158,7 +158,7 @@ static void autosave_thread(void *data)
|
||||
{
|
||||
/* Should probably deal with this more elegantly. */
|
||||
RFILE *file = filestream_open(save->path,
|
||||
RFILE_MODE_WRITE, RFILE_HINT_NONE);
|
||||
RETRO_VFS_FILE_ACCESS_WRITE, RFILE_HINT_NONE);
|
||||
|
||||
if (file)
|
||||
{
|
||||
@ -565,7 +565,7 @@ static void task_save_handler(retro_task_t *task)
|
||||
|
||||
if (!state->file)
|
||||
{
|
||||
state->file = filestream_open(state->path, RFILE_MODE_WRITE,
|
||||
state->file = filestream_open(state->path, RETRO_VFS_FILE_ACCESS_WRITE,
|
||||
RFILE_HINT_NONE);
|
||||
|
||||
if (!state->file)
|
||||
@ -738,7 +738,8 @@ static void task_load_handler(retro_task_t *task)
|
||||
|
||||
if (!state->file)
|
||||
{
|
||||
state->file = filestream_open(state->path, RFILE_MODE_READ,
|
||||
state->file = filestream_open(state->path,
|
||||
RETRO_VFS_FILE_ACCESS_READ,
|
||||
RFILE_HINT_NONE);
|
||||
|
||||
if (!state->file)
|
||||
|
Loading…
x
Reference in New Issue
Block a user