diff options
Diffstat (limited to 'src/scene.mm')
| -rw-r--r-- | src/scene.mm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/scene.mm b/src/scene.mm index ee2e2be..e4cb6b6 100644 --- a/src/scene.mm +++ b/src/scene.mm @@ -31,7 +31,10 @@ namespace buffer_back_ = buffer_front_; buffer_front_ = tmp; bytes_back_ = static_cast<std::uint8_t*>([buffer_back_ mutableBytes]); + } + auto actually_switch_buffers() -> void + { auto texture = [SKTexture textureWithData:buffer_front_ size:CGSizeMake(width, height)]; [texture setFilteringMode:SKTextureFilteringNearest]; [node_ setTexture:texture]; @@ -170,6 +173,7 @@ namespace last_time_ = currentTime; auto const delta_us = static_cast<std::uint64_t>((currentTime - last_time) * 1000. * 1000.); self->nes_->step(std::chrono::microseconds{ delta_us }); + self->display_->actually_switch_buffers(); } @end
\ No newline at end of file |
