Skip to content

Commit

Permalink
Buildfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed Jan 8, 2019
1 parent 6bd4d91 commit 9b801ae
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
9 changes: 5 additions & 4 deletions libretro-common/compat/fopen_utf8.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@
#endif
#endif

#ifdef _WIN32
#undef fopen

void *fopen_utf8(const char * filename, const char * mode)
{
#if defined(_WIN32)
#undef fopen
#if defined(_XBOX)
return fopen(filename, mode);
#elif defined(LEGACY_WIN32)
Expand All @@ -56,5 +55,7 @@ void *fopen_utf8(const char * filename, const char * mode)
free(mode_w);
return ret;
#endif
}
#else
return fopen(filename, mode);
#endif
}
2 changes: 1 addition & 1 deletion libretro-common/file/config_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ bool config_file_write(config_file_t *conf, const char *path, bool sort)
#ifdef ORBIS
int fd = orbisOpen(path,O_RDWR|O_CREAT,0644);
RARCH_LOG("[Config]config_file_write orbisOpen path=%s fd=%d\n", path, fd);
if (fd<0)
if (fd < 0)
return false;
config_file_dump_orbis(conf,fd);
orbisClose(fd);
Expand Down
10 changes: 5 additions & 5 deletions libretro-common/include/compat/fopen_utf8.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
#ifndef __LIBRETRO_SDK_COMPAT_FOPEN_UTF8_H
#define __LIBRETRO_SDK_COMPAT_FOPEN_UTF8_H

#ifdef _WIN32
/* Defined to error rather than fopen_utf8, to make it clear to everyone reading the code that not worrying about utf16 is fine */
/* Defined to error rather than fopen_utf8, to make it
* clear to everyone reading the code that not worrying
* about UTF16 is fine. */

/* TODO: enable */
/* #define fopen (use fopen_utf8 instead) */
void *fopen_utf8(const char * filename, const char * mode);
#else
#define fopen_utf8 fopen
#endif

#endif
3 changes: 1 addition & 2 deletions libretro-common/include/file/config_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,12 @@ bool config_file_write(config_file_t *conf, const char *path, bool val);

/* Dump the current config to an already opened file.
* Does not close the file. */
void config_file_dump(config_file_t *conf, FILE *file);
void config_file_dump(config_file_t *conf, FILE *file, bool val);

#ifdef ORBIS
void config_file_dump_orbis(config_file_t *conf, int fd);
#endif

void config_file_dump(config_file_t *conf, FILE *file, bool val);

bool config_file_exists(const char *path);

Expand Down
1 change: 1 addition & 0 deletions libretro-common/vfs/vfs_implementation.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ libretro_vfs_implementation_file *retro_vfs_file_open_impl(const char *path, uns
#if !defined(PS2) /* TODO: PS2 IMPROVEMENT */
stream->buf = (char*)calloc(1, 0x4000);
setvbuf(stream->fp, stream->buf, _IOFBF, 0x4000);
#endif
#endif
}
else
Expand Down

0 comments on commit 9b801ae

Please sign in to comment.