diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2025-02-06 19:54:38 +0100 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2025-02-06 19:54:38 +0100 |
| commit | 64ebfde8bcd6408e3b6925624e8680c314db6efc (patch) | |
| tree | b969314f909f7f16ef5acc63f90dca317a40850a /app/mac/scene.mm | |
| parent | d060e3a50c987d10799ccc739bdbf9d7d7a13c10 (diff) | |
get rid of nasty stdlib
Diffstat (limited to 'app/mac/scene.mm')
| -rw-r--r-- | app/mac/scene.mm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/mac/scene.mm b/app/mac/scene.mm index 0ff5122..0cfc2ac 100644 --- a/app/mac/scene.mm +++ b/app/mac/scene.mm @@ -5,6 +5,7 @@ #import "impl/input-device-gc-gamepad.hh" #import "impl/input-device-serial-controller.hh" #import "nes/app/application.hh" +#import <vector> #import <memory> #import <optional> @@ -90,9 +91,9 @@ namespace { auto const lastTimestamp = _lastTimestamp.value_or(currentTime); _lastTimestamp = currentTime; - auto deltaMicroseconds = static_cast<nes::u64>((currentTime - lastTimestamp) * 1000. * 1000.); - deltaMicroseconds = std::min(deltaMicroseconds, nes::u64{ 50000 }); - _app->frame(std::chrono::microseconds{ deltaMicroseconds }); + auto deltaMicroseconds = static_cast<nes::u32>((currentTime - lastTimestamp) * 1000. * 1000.); + deltaMicroseconds = nes::min(deltaMicroseconds, nes::u32{ 50000 }); + _app->frame(deltaMicroseconds); } - (void)handleKeyboardConnected:(NSNotification*)notification |
