Mercurial > hg > svcore
diff system/System.cpp @ 1883:e5d0ea9ac8f1
OK I give in, we are going to have to put this in a separate DLL so we can deploy a version on Win7 that doesn't have the WinRT dependency
author | Chris Cannam |
---|---|
date | Tue, 21 Jul 2020 13:59:14 +0100 |
parents | 00405d2cf0d1 |
children |
line wrap: on
line diff
--- a/system/System.cpp Thu Jun 25 12:20:20 2020 +0100 +++ b/system/System.cpp Tue Jul 21 13:59:14 2020 +0100 @@ -27,12 +27,6 @@ #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> #include <sys/sysctl.h> @@ -340,45 +334,6 @@ } } -bool -OSReportsDarkThemeActive() -{ -#ifndef AVOID_WINRT_DEPENDENCY -#ifdef _MSC_VER - using namespace winrt::Windows::UI::ViewManagement; - UISettings settings; - auto background = settings.GetColorValue(UIColorType::Background); - if (int(background.R) + int(background.G) + int(background.B) < 384) { - return true; - } -#endif -#endif - return false; -} - -bool -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(); - UISettings settings; - auto accent = settings.GetColorValue - (dark ? UIColorType::AccentLight1 : UIColorType::Accent); - r = accent.R; - g = accent.G; - b = accent.B; - return true; -#endif -#endif - (void)r; - (void)g; - (void)b; - return false; -} - double mod(double x, double y) { return x - (y * floor(x / y)); } float modf(float x, float y) { return x - (y * floorf(x / y)); }