Mercurial > hg > svcore
diff system/System.cpp @ 1820:fc18ce2d99d7 background-mode
Add OSQueryAccentColour
author | Chris Cannam |
---|---|
date | Thu, 23 Jan 2020 15:43:30 +0000 |
parents | 4eda6ba5b5d8 |
children | 472865574b1a |
line wrap: on
line diff
--- a/system/System.cpp Mon Jan 20 17:17:45 2020 +0000 +++ b/system/System.cpp Thu Jan 23 15:43:30 2020 +0000 @@ -353,6 +353,22 @@ return false; } +bool +OSQueryAccentColour(int &r, int &g, int &b) +{ + SVCERR << "OSQueryAccentColour() called" << endl; +#ifdef _MSC_VER + using namespace winrt::Windows::UI::ViewManagement; + UISettings settings; + auto background = settings.GetColorValue(UIColorType::Accent); + r = background.R; + g = background.G; + b = background.B; + return true; +#endif + 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)); }