diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-11-09 00:55:18 -0500 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-11-09 00:55:18 -0500 |
commit | da561ba4d57f58ca44bf93e066e4c80d6b5266d9 (patch) | |
tree | 8315c247b308c0bbd437137111f43281fe7b9551 /abaddon.cpp | |
parent | c40b8a412272a7a407764166917cf3c61e7dc47f (diff) | |
download | abaddon-portaudio-da561ba4d57f58ca44bf93e066e4c80d6b5266d9.tar.gz abaddon-portaudio-da561ba4d57f58ca44bf93e066e4c80d6b5266d9.zip |
initial msys compatibility
Diffstat (limited to 'abaddon.cpp')
-rw-r--r-- | abaddon.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/abaddon.cpp b/abaddon.cpp index 5373c6f..60c7107 100644 --- a/abaddon.cpp +++ b/abaddon.cpp @@ -728,6 +728,17 @@ EmojiResource &Abaddon::GetEmojis() { int main(int argc, char **argv) { if (std::getenv("ABADDON_NO_FC") == nullptr) Platform::SetupFonts(); + + char *systemLocale = std::setlocale(LC_ALL, ""); + try { + std::locale::global(std::locale(systemLocale)); + } catch (...) { + try { + std::locale::global(std::locale::classic()); + std::setlocale(LC_ALL, systemLocale); + } catch (...) {} + } + #if defined(_WIN32) && defined(_MSC_VER) TCHAR buf[2] { 0 }; GetEnvironmentVariableA("GTK_CSD", buf, sizeof(buf)); |