mirror of
https://github.com/narzoul/DDrawCompat
synced 2024-12-30 08:55:36 +01:00
Log __COMPAT_LAYER environment variable
This commit is contained in:
parent
9f206897ad
commit
8694b9a42b
@ -137,6 +137,18 @@ namespace
|
||||
return true;
|
||||
}
|
||||
|
||||
void printEnvironmentVariable(const char* var)
|
||||
{
|
||||
const DWORD size = GetEnvironmentVariable(var, nullptr, 0);
|
||||
std::string value(size, 0);
|
||||
if (!value.empty())
|
||||
{
|
||||
GetEnvironmentVariable(var, &value.front(), size);
|
||||
value.pop_back();
|
||||
}
|
||||
Compat::Log() << "Environment variable " << var << " = \"" << value << '"';
|
||||
}
|
||||
|
||||
void suppressEmulatedDirectDraw(GUID*& guid)
|
||||
{
|
||||
if (reinterpret_cast<GUID*>(DDCREATE_EMULATIONONLY) == guid)
|
||||
@ -158,6 +170,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID /*lpvReserved*/)
|
||||
GetModuleFileName(nullptr, currentProcessPath, MAX_PATH);
|
||||
Compat::Log() << "Process path: " << currentProcessPath;
|
||||
|
||||
printEnvironmentVariable("__COMPAT_LAYER");
|
||||
|
||||
char currentDllPath[MAX_PATH] = {};
|
||||
GetModuleFileName(hinstDLL, currentDllPath, MAX_PATH);
|
||||
Compat::Log() << "Loading DDrawCompat from " << currentDllPath;
|
||||
|
Loading…
x
Reference in New Issue
Block a user