1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-26 09:29:45 +00:00

Add overt flushes to the SDL target.

This commit is contained in:
Thomas Harte 2022-07-12 10:57:22 -04:00
parent 4ddbf095f3
commit 59da143e6a
3 changed files with 9 additions and 4 deletions

View File

@ -68,6 +68,8 @@ class TimedMachine {
struct Output {
static constexpr int Video = 1 << 0;
static constexpr int Audio = 1 << 1;
static constexpr int All = Video | Audio;
};
/// Ensures all locally-buffered output is posted onward for the types of output indicated
/// by the bitfield argument, which is comprised of flags from the namespace @c Output.

View File

@ -82,19 +82,19 @@
</CommandLineArgument>
<CommandLineArgument
argument = "--volume=0.001"
isEnabled = "YES">
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--new=enterprise"
isEnabled = "YES">
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--basic-version=any"
isEnabled = "YES">
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "&quot;/Users/thomasharte/Library/Mobile Documents/com~apple~CloudDocs/Desktop/Soft/ColecoVision/Galaxian (1983)(Atari).col&quot;"
isEnabled = "NO">
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "&quot;/Users/thomasharte/Library/Mobile Documents/com~apple~CloudDocs/Desktop/Soft/Master System/R-Type (NTSC).sms&quot;"

View File

@ -151,6 +151,7 @@ struct MachineRunner {
if(split_and_sync) {
timed_machine->run_for(double(vsync_time - last_time_) / 1e9);
timed_machine->flush_output(MachineTypes::TimedMachine::Output::All);
timed_machine->set_speed_multiplier(
scan_synchroniser_.next_speed_multiplier(scan_producer->get_scan_status())
);
@ -163,9 +164,11 @@ struct MachineRunner {
lock_guard.lock();
timed_machine->run_for(double(time_now - vsync_time) / 1e9);
timed_machine->flush_output(MachineTypes::TimedMachine::Output::All);
} else {
timed_machine->set_speed_multiplier(scan_synchroniser_.get_base_speed_multiplier());
timed_machine->run_for(double(time_now - last_time_) / 1e9);
timed_machine->flush_output(MachineTypes::TimedMachine::Output::All);
}
last_time_ = time_now;
}