mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-09 05:00:16 +02:00
Completely didn't listen to FEX_PORTABLE. Necessary otherwise it can read configs from some random locations when portable is enabled.
16 lines
443 B
C++
16 lines
443 B
C++
// SPDX-License-Identifier: MIT
|
|
#pragma once
|
|
#include "Common/Config.h"
|
|
|
|
namespace FEX {
|
|
static inline FEX::Config::PortableInformation ReadPortabilityInformation() {
|
|
const FEX::Config::PortableInformation BadResult {false, {}};
|
|
const char* PortableConfig = getenv("FEX_PORTABLE");
|
|
if (!PortableConfig || strtol(PortableConfig, nullptr, 0) == 0) {
|
|
return BadResult;
|
|
}
|
|
|
|
return {true, getenv("LOCALAPPDATA")};
|
|
}
|
|
} // namespace FEX
|