SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 1b50856dcfd07b538933b59f23a93db64384d92c parent 207851bc5646c74bca7021bb16ab00b298df6377 Author: Lior Halphon <LIJI32@gmail.com> Date: Wed, 21 Jun 2023 21:49:23 +0300 More of the same Diffstat:
| M | Core/apu.c | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Core/apu.c b/Core/apu.c @@ -729,7 +729,7 @@ void GB_apu_run(GB_gameboy_t *gb, bool force) update_square_sample(gb, i); uint8_t duty = gb->io_registers[i == GB_SQUARE_1? GB_IO_NR11 :GB_IO_NR21] >> 6; - uint8_t edge_sample_index = (const uint8_t[]){7, 7, 5, 1}[duty]; + uint8_t edge_sample_index = inline_const(uint8_t[], {7, 7, 5, 1})[duty]; if (gb->apu.square_channels[i].current_sample_index == edge_sample_index) { gb->apu_output.edge_triggered[i] = true; } @@ -1770,7 +1770,7 @@ uint8_t GB_get_channel_volume(GB_gameboy_t *gb, GB_channel_t channel) return gb->apu.square_channels[channel].current_volume; case GB_WAVE: - return (const uint8_t[]){0xF, 8, 4, 0, 0}[gb->apu.wave_channel.shift]; + return inline_const(uint8_t[], {0xF, 8, 4, 0, 0})[gb->apu.wave_channel.shift]; case GB_NOISE: return gb->apu.noise_channel.current_volume;
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.