mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-16 22:13:19 +00:00
Disable theme awareness if we detect Wine.
This commit is contained in:
parent
b1a8063e13
commit
b2652ad643
@ -264,6 +264,13 @@ namespace cursespp {
|
||||
}
|
||||
}
|
||||
|
||||
static bool IsWine() {
|
||||
HMODULE ntdll = LoadLibrary(L"ntdll.dll");
|
||||
bool result = ntdll != nullptr && GetProcAddress(ntdll, "wine_get_version") != nullptr;
|
||||
FreeLibrary(ntdll);
|
||||
return result;
|
||||
}
|
||||
|
||||
void ConfigureDpiAwareness() {
|
||||
typedef HRESULT(__stdcall *SetProcessDpiAwarenessProc)(int);
|
||||
static const int ADJUST_DPI_PER_MONITOR = 2;
|
||||
@ -282,6 +289,10 @@ namespace cursespp {
|
||||
}
|
||||
|
||||
void ConfigureThemeAwareness() {
|
||||
if (IsWine()) {
|
||||
return;
|
||||
}
|
||||
|
||||
typedef HRESULT(__stdcall* DwmSetWindowAttributeProc)(HWND, DWORD, LPCVOID, DWORD);
|
||||
static const DWORD DWMWA_USE_IMMERSIVE_DARK_MODE = 20;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user