# HG changeset patch # User Chris Cannam # Date 1583496766 0 # Node ID 029d7d3f0a3acabdb029261e2777310b176d9965 # Parent 1cd161242250838dd87384ff55b59d4a23f30269 Add option to avoid pulling in the WinRT dependency for this very small feature diff -r 1cd161242250 -r 029d7d3f0a3a system/System.cpp --- a/system/System.cpp Tue Jan 28 14:34:13 2020 +0000 +++ b/system/System.cpp Fri Mar 06 12:12:46 2020 +0000 @@ -27,9 +27,11 @@ #include #endif +#ifndef AVOID_WINRT_DEPENDENCY #ifdef _MSC_VER #include #endif +#endif #ifdef __APPLE__ #include @@ -342,6 +344,7 @@ OSReportsDarkThemeActive() { SVCERR << "OSReportsDarkThemeActive() called" << endl; +#ifndef AVOID_WINRT_DEPENDENCY #ifdef _MSC_VER using namespace winrt::Windows::UI::ViewManagement; UISettings settings; @@ -350,6 +353,7 @@ return true; } #endif +#endif return false; } @@ -357,6 +361,7 @@ OSQueryAccentColour(int &r, int &g, int &b) { SVCERR << "OSQueryAccentColour() called" << endl; +#ifndef AVOID_WINRT_DEPENDENCY #ifdef _MSC_VER using namespace winrt::Windows::UI::ViewManagement; bool dark = OSReportsDarkThemeActive(); @@ -368,6 +373,7 @@ b = accent.B; return true; #endif +#endif return false; }