diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2025-01-18 23:06:34 +0100 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2025-01-18 23:06:34 +0100 |
| commit | 502dc171f45e5acf00c34521328b414d5285f598 (patch) | |
| tree | f08a723b8c770556106168c6f3e7880057d32b50 /src/scene.mm | |
| parent | 67672d06776e38b06f31f6599678767c60eed58a (diff) | |
wip ppu
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 |
