Files
OptiScaler/CyberXeSS/Util.cpp
T
2024-02-17 18:15:29 +03:00

36 lines
511 B
C++

#include "pch.h"
#include "Config.h"
#include "Util.h"
namespace fs = std::filesystem;
extern HMODULE dllModule;
fs::path Util::DllPath()
{
static fs::path dll;
if (dll.empty())
{
wchar_t dllPath[MAX_PATH];
GetModuleFileNameW(dllModule, dllPath, MAX_PATH);
dll = fs::path(dllPath);
}
return dll;
}
fs::path Util::ExePath()
{
static fs::path exe;
if (exe.empty())
{
wchar_t exePath[MAX_PATH];
GetModuleFileNameW(nullptr, exePath, MAX_PATH);
exe = fs::path(exePath);
}
return exe;
}