What kind of bug farm is this filestream thingy

This commit is contained in:
Alcaro 2017-12-29 15:31:17 +01:00
parent 8c2070947e
commit ec4b0f9089
4 changed files with 10 additions and 7 deletions

View File

@ -64,7 +64,7 @@ ifneq ($(V),1)
Q := @ Q := @
endif endif
ifeq ($(DEBUG), 1) ifneq ($(DEBUG), 0)
OPTIMIZE_FLAG = -O0 -g OPTIMIZE_FLAG = -O0 -g
else else
OPTIMIZE_FLAG = -O3 -ffast-math OPTIMIZE_FLAG = -O3 -ffast-math

View File

@ -30,8 +30,7 @@ RFILE* rfopen(const char *path, const char *mode)
{ {
unsigned int retro_mode = 0; unsigned int retro_mode = 0;
if (strstr(mode, "r")) if (strstr(mode, "r"))
if (strstr(mode, "b")) retro_mode = RETRO_VFS_FILE_ACCESS_READ;
retro_mode = RETRO_VFS_FILE_ACCESS_READ;
if (strstr(mode, "w")) if (strstr(mode, "w"))
retro_mode = RETRO_VFS_FILE_ACCESS_WRITE; retro_mode = RETRO_VFS_FILE_ACCESS_WRITE;

View File

@ -235,13 +235,17 @@ libretro_vfs_implementation_file *retro_vfs_file_open_impl(const char *path, uns
#endif #endif
} }
break; break;
/* TODO/FIXME - implement */
case RETRO_VFS_FILE_ACCESS_UPDATE_EXISTING: case RETRO_VFS_FILE_ACCESS_UPDATE_EXISTING:
break; /* TODO/FIXME - implement */
return NULL;
default:
return NULL;
} }
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0 && mode_str) if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
{ {
if (!mode_str)
return NULL;
stream->fp = fopen_utf8(path, mode_str); stream->fp = fopen_utf8(path, mode_str);
if (!stream->fp) if (!stream->fp)

View File

@ -1222,7 +1222,7 @@ static void retroarch_main_init_media(void)
* *
* Initializes the program. * Initializes the program.
* *
* Returns: 0 on success, otherwise 1 if there was an error. * Returns: true on success, otherwise false if there was an error.
**/ **/
bool retroarch_main_init(int argc, char *argv[]) bool retroarch_main_init(int argc, char *argv[])
{ {