initial msys compatibility

This commit is contained in:
ouwou
2021-11-09 00:55:18 -05:00
parent c40b8a4122
commit da561ba4d5
4 changed files with 21 additions and 12 deletions

View File

@@ -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));