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,