summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorFernando S <fsahmkow27@gmail.com>2022-07-10 10:29:56 +0200
committerGitHub <noreply@github.com>2022-07-10 10:29:56 +0200
commit25e47738f71e6a6469ff251dd84e28289133dad1 (patch)
treec431a3b1ee04fb4da60e08ab21d78a5813e9b528 /src/tests
parentMerge pull request #8531 from FernandoS27/core-timing-fix-reg (diff)
parentPR (diff)
downloadyuzu-25e47738f71e6a6469ff251dd84e28289133dad1.tar
yuzu-25e47738f71e6a6469ff251dd84e28289133dad1.tar.gz
yuzu-25e47738f71e6a6469ff251dd84e28289133dad1.tar.bz2
yuzu-25e47738f71e6a6469ff251dd84e28289133dad1.tar.lz
yuzu-25e47738f71e6a6469ff251dd84e28289133dad1.tar.xz
yuzu-25e47738f71e6a6469ff251dd84e28289133dad1.tar.zst
yuzu-25e47738f71e6a6469ff251dd84e28289133dad1.zip
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/core/core_timing.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tests/core/core_timing.cpp b/src/tests/core/core_timing.cpp
index e687416a8..894975e6f 100644
--- a/src/tests/core/core_timing.cpp
+++ b/src/tests/core/core_timing.cpp
@@ -9,6 +9,7 @@
#include <cstdlib>
#include <memory>
#include <mutex>
+#include <optional>
#include <string>
#include "core/core.h"
@@ -25,13 +26,15 @@ u64 expected_callback = 0;
std::mutex control_mutex;
template <unsigned int IDX>
-void HostCallbackTemplate(std::uintptr_t user_data, std::chrono::nanoseconds ns_late) {
+std::optional<std::chrono::nanoseconds> HostCallbackTemplate(std::uintptr_t user_data, s64 time,
+ std::chrono::nanoseconds ns_late) {
std::unique_lock<std::mutex> lk(control_mutex);
static_assert(IDX < CB_IDS.size(), "IDX out of range");
callbacks_ran_flags.set(IDX);
REQUIRE(CB_IDS[IDX] == user_data);
delays[IDX] = ns_late.count();
++expected_callback;
+ return std::nullopt;
}
struct ScopeInit final {