Files
simplysanatori--KartFrame/runtime/include/vr/reference_space_changes.h
T
heurazy 3e96d5c661 Integrate VR port features and Quest standalone support
Add migrated controls, onboarding, spatial menus, controller profiles and launcher packaging. Fix VR overlay rendering and tracking, add textured animated Touch Plus models, and disable frame interpolation on Quest.
2026-09-27 15:56:28 +02:00

22 lines
742 B
C++

#pragma once
#include <algorithm>
#include <cstdint>
#include <vector>
namespace mkw::vr {
// Preserve future runtime events and distinguish them from our own origin
// replacement. Otherwise applying a repair can immediately undo itself.
template<class Change>
bool ConsumeReferenceSpaceChanges(std::vector<Change>& pending,int64_t display_time,
bool* external=nullptr) {
bool consumed=false;
if(external) *external=false;
std::erase_if(pending,[&](const Change& change) {
const bool due=change.change_time==0 || display_time>=change.change_time;
consumed |= due;
if(external && due && change.external) *external=true;
return due;
});
return consumed;
}
}