Mercurial > repos > blastem
diff rf5c164.c @ 2302:0343f0d5add0
Fix libretro build for real
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 12 Mar 2023 20:03:35 -0700 |
parents | 9ead0fe69d9b |
children | c76c81c21ae5 |
line wrap: on
line diff
--- a/rf5c164.c Thu Mar 09 23:10:41 2023 -0800 +++ b/rf5c164.c Sun Mar 12 20:03:35 2023 -0700 @@ -154,14 +154,20 @@ int16_t left = (sample * (pcm->channels[pcm->cur_channel].regs[PAN] >> 4)) >> 5; int16_t right = (sample * (pcm->channels[pcm->cur_channel].regs[PAN] & 0xF)) >> 5; //printf("chan %d, raw %X, sample %d, left %d, right %d, ptr %X (raw %X)\n", pcm->cur_channel, pcm->channels[pcm->cur_channel].sample, sample, left, right, pcm->channels[pcm->cur_channel].cur_ptr >> 11, pcm->channels[pcm->cur_channel].cur_ptr); +#ifndef IS_LIB if (pcm->scope) { scope_add_sample(pcm->scope, pcm->channels[pcm->cur_channel].scope_channel, sample, pcm->channels[pcm->cur_channel].trigger); } +#endif pcm->left += left; pcm->right += right; +#ifdef IS_LIB + } +#else } else if (pcm->scope) { scope_add_sample(pcm->scope, pcm->channels[pcm->cur_channel].scope_channel, 0, 0); } +#endif write_if_not_sounding(pcm); CHECK; case 10: @@ -246,6 +252,7 @@ void rf5c164_enable_scope(rf5c164* pcm, oscilloscope *scope) { +#ifndef IS_LIB static const char *names[] = { "Richo #1", "Richo #2", @@ -261,6 +268,7 @@ { pcm->channels[i].scope_channel = scope_add_channel(scope, names[i], 50000000 / (pcm->clock_step * 96)); } +#endif } void rf5c164_serialize(rf5c164* pcm, serialize_buffer *buf)