| 39 | |
| 40 | static bool Enabled {true}; |
| 41 | void Initialize() { |
| 42 | FEX_CONFIG_OPT(DisableTelemetry, DISABLETELEMETRY); |
| 43 | if (DisableTelemetry) { |
| 44 | Enabled = false; |
| 45 | return; |
| 46 | } |
| 47 | |
| 48 | const auto& DataDirectory = Config::GetTelemetryDirectory(); |
| 49 | |
| 50 | // Ensure the folder structure is created for our configuration |
| 51 | if (!FHU::Filesystem::Exists(DataDirectory) && !FHU::Filesystem::CreateDirectories(DataDirectory)) { |
| 52 | LogMan::Msg::IFmt("Couldn't create telemetry Folder"); |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | void Shutdown(const fextl::string& ApplicationName) { |
| 57 | if (!Enabled) { |