mirror of
https://github.com/simplysanatori/KartFrame.git
synced 2026-10-17 16:02:19 +02:00
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.
22 lines
742 B
C++
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;
|
|
}
|
|
}
|