From da561ba4d57f58ca44bf93e066e4c80d6b5266d9 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Tue, 9 Nov 2021 00:55:18 -0500 Subject: initial msys compatibility --- abaddon.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'abaddon.cpp') 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)); -- cgit v1.2.3