mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
Move nbio to libretro-SDK - best place for it currently
This commit is contained in:
parent
66682b42f1
commit
f3fbd4c9ce
@ -100,7 +100,7 @@ OBJ += frontend/frontend.o \
|
|||||||
libretro-sdk/file/dir_list.o \
|
libretro-sdk/file/dir_list.o \
|
||||||
libretro-sdk/string/string_list.o \
|
libretro-sdk/string/string_list.o \
|
||||||
file_ops.o \
|
file_ops.o \
|
||||||
nbio/nbio_stdio.o \
|
libretro-sdk/file//nbio/nbio_stdio.o \
|
||||||
libretro-sdk/file/file_path.o \
|
libretro-sdk/file/file_path.o \
|
||||||
hash.o \
|
hash.o \
|
||||||
audio/audio_driver.o \
|
audio/audio_driver.o \
|
||||||
|
@ -566,7 +566,7 @@ FILE
|
|||||||
#include "../libretro-sdk/file/dir_list.c"
|
#include "../libretro-sdk/file/dir_list.c"
|
||||||
#include "../libretro-sdk/string/string_list.c"
|
#include "../libretro-sdk/string/string_list.c"
|
||||||
#include "../file_ops.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"
|
#include "../libretro-sdk/file/file_list.c"
|
||||||
|
|
||||||
/*============================================================
|
/*============================================================
|
||||||
|
@ -3,7 +3,7 @@ TARGET := nbio_test
|
|||||||
SOURCES := $(wildcard *.c)
|
SOURCES := $(wildcard *.c)
|
||||||
OBJS := $(SOURCES:.c=.o)
|
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)
|
all: $(TARGET)
|
||||||
|
|
@ -1,7 +1,8 @@
|
|||||||
#include "nbio.h"
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <file/nbio.h>
|
||||||
|
|
||||||
struct nbio_t
|
struct nbio_t
|
||||||
{
|
{
|
||||||
FILE* f;
|
FILE* f;
|
@ -1,10 +1,11 @@
|
|||||||
#include "nbio.h"
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <file/nbio.h>
|
||||||
|
|
||||||
static void nbio_write_test(void)
|
static void nbio_write_test(void)
|
||||||
{
|
{
|
||||||
size_t size, prog;
|
size_t size;
|
||||||
bool looped = false;
|
bool looped = false;
|
||||||
void* ptr = NULL;
|
void* ptr = NULL;
|
||||||
struct nbio_t* write = nbio_open("test.bin", NBIO_WRITE);
|
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);
|
memset(ptr, 0x42, 1024*1024);
|
||||||
nbio_begin_write(write);
|
nbio_begin_write(write);
|
||||||
|
|
||||||
while (!nbio_iterate(write, &prog, &size)) looped=true;
|
while (!nbio_iterate(write)) looped=true;
|
||||||
|
|
||||||
if (!looped)
|
if (!looped)
|
||||||
puts("Write finished immediately?");
|
puts("Write finished immediately?");
|
||||||
@ -28,7 +29,7 @@ static void nbio_write_test(void)
|
|||||||
|
|
||||||
static void nbio_read_test(void)
|
static void nbio_read_test(void)
|
||||||
{
|
{
|
||||||
size_t size, prog;
|
size_t size;
|
||||||
bool looped = false;
|
bool looped = false;
|
||||||
struct nbio_t* read = nbio_open("test.bin", NBIO_READ);
|
struct nbio_t* read = nbio_open("test.bin", NBIO_READ);
|
||||||
void* ptr = nbio_get_ptr(read, &size);
|
void* ptr = nbio_get_ptr(read, &size);
|
Loading…
x
Reference in New Issue
Block a user