| 133 | } |
| 134 | |
| 135 | std::filesystem::path streamfx::data_file_path(std::string_view file) |
| 136 | { |
| 137 | const char* root_path = obs_get_module_data_path(obs_current_module()); |
| 138 | if (root_path) { |
| 139 | auto ret = std::filesystem::u8path(root_path); |
| 140 | ret.append(file.data()); |
| 141 | return ret; |
| 142 | } else { |
| 143 | throw std::runtime_error("obs_get_module_data_path returned nullptr"); |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | std::filesystem::path streamfx::config_file_path(std::string_view file) |
| 148 | { |