mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-22 12:33:29 +00:00
Adds a route to not bumping time.
This commit is contained in:
parent
2f2478d2d3
commit
9859f99513
@ -38,6 +38,11 @@ template <class T, class LocalTimeScale, class TargetTimeScale = LocalTimeScale>
|
||||
return &object_;
|
||||
}
|
||||
|
||||
/// Returns a pointer to the included object without flushing time.
|
||||
inline T *last_valid() {
|
||||
return &object_;
|
||||
}
|
||||
|
||||
/// Flushes all accumulated time.
|
||||
inline void flush() {
|
||||
if(!is_flushed_) object_.run_for(time_since_update_.template flush<TargetTimeScale>());
|
||||
@ -80,6 +85,11 @@ template <class T, class LocalTimeScale, class TargetTimeScale = LocalTimeScale>
|
||||
return &object_;
|
||||
}
|
||||
|
||||
/// Returns a pointer to the included object without flushing time.
|
||||
inline T *last_valid() {
|
||||
return &object_;
|
||||
}
|
||||
|
||||
/// Flushes all accumulated time.
|
||||
inline void flush() {
|
||||
if(!is_flushed_) {
|
||||
|
@ -237,7 +237,7 @@ class ConcreteMachine:
|
||||
*cycle.value = vdp_->get_current_line();
|
||||
break;
|
||||
case 0x41:
|
||||
*cycle.value = vdp_->get_latched_horizontal_counter();
|
||||
*cycle.value = vdp_.last_valid()->get_latched_horizontal_counter();
|
||||
break;
|
||||
case 0x80: case 0x81:
|
||||
*cycle.value = vdp_->get_register(address);
|
||||
|
Loading…
Reference in New Issue
Block a user