mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-05-12 12:40:55 +00:00
8397aa0bf7
logging refactorings
36 lines
511 B
C++
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;
|
|
}
|