Move nbio to libretro-SDK - best place for it currently

This commit is contained in:
twinaphex 2015-02-17 02:04:19 +01:00
parent 66682b42f1
commit f3fbd4c9ce
6 changed files with 11 additions and 9 deletions

View File

@ -100,7 +100,7 @@ OBJ += frontend/frontend.o \
libretro-sdk/file/dir_list.o \
libretro-sdk/string/string_list.o \
file_ops.o \
nbio/nbio_stdio.o \
libretro-sdk/file//nbio/nbio_stdio.o \
libretro-sdk/file/file_path.o \
hash.o \
audio/audio_driver.o \

View File

@ -566,7 +566,7 @@ FILE
#include "../libretro-sdk/file/dir_list.c"
#include "../libretro-sdk/string/string_list.c"
#include "../file_ops.c"
#include "../nbio/nbio_stdio.c"
#include "../libretro-sdk/file/nbio/nbio_stdio.c"
#include "../libretro-sdk/file/file_list.c"
/*============================================================

View File

@ -3,7 +3,7 @@ TARGET := nbio_test
SOURCES := $(wildcard *.c)
OBJS := $(SOURCES:.c=.o)
CFLAGS += -Wall -pedantic -std=gnu99 -O0 -g -I../libretro-sdk/include
CFLAGS += -Wall -pedantic -std=gnu99 -O0 -g -I../../include
all: $(TARGET)

View File

@ -1,7 +1,8 @@
#include "nbio.h"
#include <stdio.h>
#include <stdlib.h>
#include <file/nbio.h>
struct nbio_t
{
FILE* f;

View File

@ -1,10 +1,11 @@
#include "nbio.h"
#include <string.h>
#include <stdio.h>
#include <string.h>
#include <file/nbio.h>
static void nbio_write_test(void)
{
size_t size, prog;
size_t size;
bool looped = false;
void* ptr = NULL;
struct nbio_t* write = nbio_open("test.bin", NBIO_WRITE);
@ -18,7 +19,7 @@ static void nbio_write_test(void)
memset(ptr, 0x42, 1024*1024);
nbio_begin_write(write);
while (!nbio_iterate(write, &prog, &size)) looped=true;
while (!nbio_iterate(write)) looped=true;
if (!looped)
puts("Write finished immediately?");
@ -28,7 +29,7 @@ static void nbio_write_test(void)
static void nbio_read_test(void)
{
size_t size, prog;
size_t size;
bool looped = false;
struct nbio_t* read = nbio_open("test.bin", NBIO_READ);
void* ptr = nbio_get_ptr(read, &size);