mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-29 12:32:36 +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() {
|
void ConfigureDpiAwareness() {
|
||||||
typedef HRESULT(__stdcall *SetProcessDpiAwarenessProc)(int);
|
typedef HRESULT(__stdcall *SetProcessDpiAwarenessProc)(int);
|
||||||
static const int ADJUST_DPI_PER_MONITOR = 2;
|
static const int ADJUST_DPI_PER_MONITOR = 2;
|
||||||
@ -282,6 +289,10 @@ namespace cursespp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ConfigureThemeAwareness() {
|
void ConfigureThemeAwareness() {
|
||||||
|
if (IsWine()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
typedef HRESULT(__stdcall* DwmSetWindowAttributeProc)(HWND, DWORD, LPCVOID, DWORD);
|
typedef HRESULT(__stdcall* DwmSetWindowAttributeProc)(HWND, DWORD, LPCVOID, DWORD);
|
||||||
static const DWORD DWMWA_USE_IMMERSIVE_DARK_MODE = 20;
|
static const DWORD DWMWA_USE_IMMERSIVE_DARK_MODE = 20;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user