Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@ ANDROID_SOURCES_C := \
../src/stic.c \
../src/stb_image_impl.c \
../src/deps/libretro-common/file/file_path.c \
../src/deps/libretro-common/file/file_path_io.c \
../src/deps/libretro-common/compat/compat_posix_string.c \
../src/deps/libretro-common/compat/compat_snprintf.c \
../src/deps/libretro-common/compat/compat_strl.c \
../src/deps/libretro-common/compat/compat_strcasestr.c \
../src/deps/libretro-common/compat/fopen_utf8.c \
../src/deps/libretro-common/encodings/encoding_utf.c \
../src/deps/libretro-common/streams/file_stream.c \
../src/deps/libretro-common/string/stdstring.c \
../src/deps/libretro-common/time/rtime.c
../src/deps/libretro-common/time/rtime.c \
../src/deps/libretro-common/vfs/vfs_implementation.c

include $(CLEAR_VARS)
LOCAL_MODULE := retro
Expand Down
8 changes: 6 additions & 2 deletions src/cart.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,17 @@ int LoadCart(const char *path)
{
unsigned char word[1];

#ifdef __LIBRETRO__
RFILE *fp;
#else
FILE *fp;
#endif

printf("[INFO] [FREEINTV] Attempting to load cartridge ROM from: %s\n", path);

size = 0;

#ifdef __LIBRETRO__
RFILE *fp;
if((fp = filestream_open(path, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE)) != NULL)
{
while(filestream_read(fp, word, sizeof(word)) == sizeof(word) && size<0x20000)
Expand All @@ -67,7 +72,6 @@ int LoadCart(const char *path)
filestream_close(fp);
printf("[INFO] [FREEINTV] Cartridge load complete: %d bytes read\n", size);
#else
FILE *fp;
if((fp = fopen(path,"rb"))!=NULL)
{
while(fread(word,sizeof(word),1,fp) && size<0x20000)
Expand Down
16 changes: 12 additions & 4 deletions src/intv.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ void loadExec(const char* path)
unsigned char word[2];

#ifdef __LIBRETRO__
RFILE *fp;
RFILE *fp;
#else
FILE *fp;
#endif

#ifdef __LIBRETRO__
if((fp = filestream_open(path, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE)) != NULL)
{
for(i=0x1000; i<=0x1FFF; i++)
Expand All @@ -69,7 +74,6 @@ void loadExec(const char* path)
printf("[INFO] [FREEINTV] Succeeded loading Executive BIOS from: %s\n", path);
}
#else
FILE *fp;
if((fp = fopen(path,"rb"))!=NULL)
{
for(i=0x1000; i<=0x1FFF; i++)
Expand Down Expand Up @@ -98,7 +102,12 @@ void loadGrom(const char* path)
unsigned char word[1];

#ifdef __LIBRETRO__
RFILE *fp;
RFILE *fp;
#else
FILE *fp;
#endif

#ifdef __LIBRETRO__
if((fp = filestream_open(path, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE)) != NULL)
{
for(i=0x3000; i<=0x37FF; i++)
Expand All @@ -112,7 +121,6 @@ void loadGrom(const char* path)
printf("[INFO] [FREEINTV] Succeeded loading Graphics BIOS from: %s\n", path);
}
#else
FILE *fp;
if((fp = fopen(path,"rb"))!=NULL)
{
for(i=0x3000; i<=0x37FF; i++)
Expand Down
Loading