Use the mapped_file class instead of asset for assets

This commit is contained in:
Guillaume Meunier
2025-10-25 10:30:27 +02:00
parent 7963efc034
commit a9f774c67c
14 changed files with 143 additions and 241 deletions
+3 -3
View File
@@ -19,9 +19,9 @@
#include "input_profile.h"
#include "application.h"
#include "asset.h"
#include "hardware.h"
#include "render/scene_components.h"
#include "utils/mapped_file.h"
#include "xr/space.h"
#include <entt/entt.hpp>
#include <glm/gtc/matrix_access.hpp>
@@ -175,10 +175,10 @@ struct json_visual_response
input_profile::input_profile(scene & scene, const std::filesystem::path & json_profile, uint32_t layer_mask_controller, uint32_t layer_mask_ray)
{
std::string json = asset(json_profile);
utils::mapped_file json{json_profile};
simdjson::dom::parser parser;
simdjson::dom::element root = parser.parse(json);
simdjson::dom::element root = parser.parse(reinterpret_cast<const char *>(json.data()), json.size());
id = std::string(root["profileId"]);