commit 7ec95315ce696c0aceb4e9fb4f0a9eb55e5e307f
parent 8ca6c75e29b87e0f96ac52f13892401fc30859b0
Author: Bad Diode <bd@badd10de.dev>
Date: Wed, 20 Dec 2023 09:20:22 +0100
Fix audio device regression
Diffstat:
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git 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
@@ -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...]");