Permit granular specification of what to flush.

This commit is contained in:
Thomas Harte committed 2022-07-08 15:38:29 -04:00
1 parent 5c3084c37c
commit b03d91d5dd
4 files changed
+18 -9

No files matched your search

+8 -4
View File
@@ -210,10 +210,14 @@ class ConcreteMachine:
z80_.run_for(cycles);
}
void flush_output() final {
vdp_.flush();
update_audio();
audio_queue_.perform();
void flush_output(Output output) final {
if(int(output) & int(Output::Video)) {
vdp_.flush();
}
if(int(output) & int(Output::Audio)) {
update_audio();
audio_queue_.perform();
}
}
forceinline HalfCycles perform_machine_cycle(const CPU::Z80::PartialMachineCycle &cycle) {