| 15 | using namespace reshade::api; |
| 16 | |
| 17 | static 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 | |
| 36 | bool load_texture_image(const resource_desc &desc, subresource_data &data, std::vector<std::vector<uint8_t>> &data_to_delete) |
| 37 | { |
no outgoing calls
no test coverage detected