diff options
author | Autechre | 2022-03-22 15:22:37 +0100 |
---|---|---|
committer | GitHub | 2022-03-22 15:22:37 +0100 |
commit | a279e2b216919d79777928bad01e3d92039ad0fb (patch) | |
tree | 652add684a4e5d7cda11381507618f57f4c292d8 /source/memmap.c | |
parent | abd072aa370620112a88cc7b350c2dfb1b58185a (diff) | |
parent | d22597e9032ee8024b477af78000704ec072e49b (diff) | |
download | snes9x2005-a279e2b216919d79777928bad01e3d92039ad0fb.tar.gz snes9x2005-a279e2b216919d79777928bad01e3d92039ad0fb.tar.bz2 snes9x2005-a279e2b216919d79777928bad01e3d92039ad0fb.zip |
Merge pull request #95 from jdgleaver/audio-sample-pacing
Fix audio sample pacing
Diffstat (limited to 'source/memmap.c')
-rw-r--r-- | source/memmap.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/memmap.c b/source/memmap.c index d7986e1..8db9f93 100644 --- a/source/memmap.c +++ b/source/memmap.c @@ -217,7 +217,7 @@ static int32_t ScoreLoROM(bool skip_header, int32_t romoff) static char* Safe(const char* s) { - static char* safe; + static char* safe = NULL; static int32_t safe_len = 0; int32_t i; int32_t len; @@ -338,7 +338,7 @@ void S9xDeinitMemory(void) Memory.BSRAM = NULL; } - for (t = 0; t < 2; t++) + for (t = 0; t <= TILE_8BIT; t++) { if (IPPU.TileCache[t]) { @@ -351,6 +351,10 @@ void S9xDeinitMemory(void) IPPU.TileCached[t] = NULL; } } + + /* Ensure that we free the static char + * array allocated by Safe() */ + Safe(NULL); } #ifndef LOAD_FROM_MEMORY |