From 7ec95315ce696c0aceb4e9fb4f0a9eb55e5e307f Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Wed, 20 Dec 2023 09:20:22 +0100 Subject: [PATCH] Fix audio device regression --- src/uxn.h | 2 +- src/uxnemu.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/uxn.h b/src/uxn.h index 04f4aa5..6a0dc97 100644 --- a/src/uxn.h +++ b/src/uxn.h @@ -29,7 +29,7 @@ typedef struct { } Stack; typedef struct Uxn { - Uint8 *ram, dev[0x100]; + Uint8 *ram, *dev; Stack wst, rst; } Uxn; diff --git a/src/uxnemu.c b/src/uxnemu.c index ebcb33d..d91041d 100644 --- a/src/uxnemu.c +++ b/src/uxnemu.c @@ -488,7 +488,10 @@ main(int argc, char **argv) { Uint8 *ram; char *rom; + Uint8 dev[0x100] = {0}; Uxn u = {0}, u_audio = {0}; + u.dev = (Uint8 *)&dev; + u_audio.dev = (Uint8 *)&dev; int i = 1; if(i == argc) return system_error("usage", "uxnemu [-v] | uxnemu [-f | -2x | -3x | --] file.rom [args...]");