From f0481d94135b9f671bea3847559431e67a07bf48 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Wed, 29 Jan 2014 23:13:44 -0800 Subject: [PATCH] Enable piping through BIOS --- src/gba/gba-thread.c | 3 +++ src/gba/gba-thread.h | 1 + src/platform/sdl/gl-main.c | 1 + 3 files changed, 5 insertions(+) diff --git a/src/gba/gba-thread.c b/src/gba/gba-thread.c index 0151a0219..5aa4acd75 100644 --- a/src/gba/gba-thread.c +++ b/src/gba/gba-thread.c @@ -92,6 +92,9 @@ static THREAD_ENTRY _GBAThreadRun(void* context) { } gba.savefile = savedata; GBALoadROM(&gba, threadContext->fd, threadContext->fname); + if (threadContext->biosFd >= 0) { + GBALoadBIOS(&gba, threadContext->biosFd); + } } #ifdef USE_DEBUGGER diff --git a/src/gba/gba-thread.h b/src/gba/gba-thread.h index 16ce72be5..6bb42c8e6 100644 --- a/src/gba/gba-thread.h +++ b/src/gba/gba-thread.h @@ -39,6 +39,7 @@ struct GBAThread { // Input struct GBAVideoRenderer* renderer; int fd; + int biosFd; const char* fname; int activeKeys; int frameskip; diff --git a/src/platform/sdl/gl-main.c b/src/platform/sdl/gl-main.c index f9b6ac8b8..60157057f 100644 --- a/src/platform/sdl/gl-main.c +++ b/src/platform/sdl/gl-main.c @@ -70,6 +70,7 @@ int main(int argc, char** argv) { struct GBAThread context = { .fd = fd, + .biosFd = -1, .fname = fname, .useDebugger = 1, .renderer = &renderer.d.d,