MCPcopy Create free account
hub / github.com/crosire/reshade / make_texture_file_path

Function make_texture_file_path

examples/utils/load_texture_image.cpp:17–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15using namespace reshade::api;
16
17static std::filesystem::path make_texture_file_path(uint32_t texture_hash)
18{
19 // Prepend executable directory to image files
20 wchar_t file_prefix[MAX_PATH] = L"";
21 GetModuleFileNameW(nullptr, file_prefix, ARRAYSIZE(file_prefix));
22
23 std::filesystem::path path = file_prefix;
24 path = path.parent_path();
25 path /= RESHADE_ADDON_TEXTURE_LOAD_DIR;
26
27 wchar_t hash_string[11];
28 swprintf_s(hash_string, L"0x%08X", texture_hash);
29
30 path /= hash_string;
31 path += RESHADE_ADDON_TEXTURE_LOAD_FORMAT;
32
33 return path;
34}
35
36bool load_texture_image(const resource_desc &desc, subresource_data &data, std::vector<std::vector<uint8_t>> &data_to_delete)
37{

Callers 1

load_texture_imageFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected