diff --git a/platforms/windows/windows.cpp b/platforms/windows/windows.cpp index d9c3926..36b4bcd 100755 --- a/platforms/windows/windows.cpp +++ b/platforms/windows/windows.cpp @@ -5,6 +5,9 @@ #include #include #include +#include + +#pragma comment(lib, "windowsapp") std::map inputToKeyCode = { { {InputButton::C, 67}, @@ -92,5 +95,15 @@ void platform::unmute_output() { } PlatformTheme platform::get_theme() { - return PlatformTheme::Light; + using namespace winrt::Windows::UI::ViewManagement; + + // TODO: figure out if this works pre-anniversary update/other windows other than 10 + UISettings settings; + auto background = settings.GetColorValue(UIColorType::Background); + auto foreground = settings.GetColorValue(UIColorType::Foreground); + + if (background == winrt::Windows::UI::Colors::White()) + return PlatformTheme::Light; + else + return PlatformTheme::Dark; } \ No newline at end of file