This commit is contained in:
2026-05-20 01:03:54 +02:00
parent 74d7d2e064
commit 9d12fe411f

View File

@@ -26,7 +26,8 @@ Java_at_lockstep_filter_StepDetector_native_1create(
jclass /*unused*/, jlong engineHandle) { jclass /*unused*/, jlong engineHandle) {
auto *listener = reinterpret_cast<StepListener *>(engineHandle); auto *listener = reinterpret_cast<StepListener *>(engineHandle);
// We use std::nothrow so `new` returns a nullptr if the engine creation fails // We use std::nothrow so `new` returns a nullptr if the engine creation fails
auto *detector = new(std::nothrow) StepDetector(60.0 /* FPS */, listener); // TODO // the hardcoded 'fps' is only an initial value, which is re-computed in StepDetector
auto *detector = new(std::nothrow) StepDetector(60.0 /* FPS */, listener);
return reinterpret_cast<jlong>(detector); return reinterpret_cast<jlong>(detector);
} }