Mercurial > hg > svcore
changeset 1825:029d7d3f0a3a
Add option to avoid pulling in the WinRT dependency for this very small feature
author | Chris Cannam |
---|---|
date | Fri, 06 Mar 2020 12:12:46 +0000 |
parents | 1cd161242250 |
children | a4dce53b3353 |
files | system/System.cpp |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 <unistd.h> #endif +#ifndef AVOID_WINRT_DEPENDENCY #ifdef _MSC_VER #include <winrt/Windows.UI.ViewManagement.h> #endif +#endif #ifdef __APPLE__ #include <sys/param.h> @@ -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; }