Fix and restore optimization
This commit is contained in:
parent
32361589c9
commit
ddc4e7484b
@ -70,7 +70,8 @@ static void render(GB_gameboy_t *gb, bool no_downsampling, GB_sample_t *dest)
|
||||
{
|
||||
GB_sample_t output = {0,0};
|
||||
|
||||
for (unsigned i = GB_N_CHANNELS; i--;) {
|
||||
UNROLL
|
||||
for (unsigned i = 0; i < GB_N_CHANNELS; i++) {
|
||||
double multiplier = CH_STEP;
|
||||
if (!is_DAC_enabled(gb, i)) {
|
||||
gb->apu_output.dac_discharge[i] -= ((double) DAC_DECAY_SPEED) / gb->apu_output.sample_rate;
|
||||
@ -375,7 +376,7 @@ void GB_apu_run(GB_gameboy_t *gb)
|
||||
}
|
||||
|
||||
UNROLL
|
||||
for (unsigned i = GB_SQUARE_2 + 1; i--;) {
|
||||
for (unsigned i = GB_SQUARE_1; i <= GB_SQUARE_2; i++) {
|
||||
if (gb->apu.is_active[i]) {
|
||||
uint8_t cycles_left = cycles;
|
||||
while (unlikely(cycles_left > gb->apu.square_channels[i].sample_countdown)) {
|
||||
|
2
Makefile
2
Makefile
@ -204,7 +204,7 @@ $(BIN)/SameBoy.app/Contents/MacOS/SameBoy: $(CORE_OBJECTS) $(COCOA_OBJECTS)
|
||||
-@$(MKDIR) -p $(dir $@)
|
||||
$(CC) $^ -o $@ $(LDFLAGS) -framework OpenGL -framework AudioUnit -framework AVFoundation -framework CoreVideo -framework CoreMedia -framework IOKit
|
||||
ifeq ($(CONF), release)
|
||||
#strip $@
|
||||
strip $@
|
||||
endif
|
||||
|
||||
$(BIN)/SameBoy.app/Contents/Resources/Base.lproj/%.nib: Cocoa/%.xib
|
||||
|
Loading…
Reference in New Issue
Block a user