mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 13:05:25 -05:00
impr: Use proper function to get environment variables
This commit is contained in:
@@ -638,8 +638,8 @@ namespace hex {
|
||||
#elif defined(OS_MACOS)
|
||||
return ::getBackingScaleFactor();
|
||||
#elif defined(OS_LINUX)
|
||||
const auto sessionType = ::getenv("XDG_SESSION_TYPE");
|
||||
if (sessionType == nullptr || std::string_view(sessionType) == "x11")
|
||||
const auto sessionType = hex::getEnvironmentVariable("XDG_SESSION_TYPE");
|
||||
if (!sessionType.has_value() || sessionType == "x11")
|
||||
return 1.0F;
|
||||
else {
|
||||
float xScale = 0, yScale = 0;
|
||||
|
||||
Reference in New Issue
Block a user