confine locale weirdness to windows only (#317)

This commit is contained in:
ouwou
2024-06-25 00:25:17 -04:00
parent 8fc4d0334f
commit e3e5b700df
4 changed files with 33 additions and 20 deletions

View File

@@ -1154,9 +1154,14 @@ void Abaddon::on_window_hide() {
}
int main(int argc, char **argv) {
if (std::getenv("ABADDON_NO_FC") == nullptr)
if (std::getenv("ABADDON_NO_FC") == nullptr) {
Platform::SetupFonts();
}
// windows doesnt have langinfo.h so some localization falls back to translation strings
// i dont like the default translation so this lets us use strftime
#ifdef _WIN32
char *systemLocale = std::setlocale(LC_ALL, "");
try {
if (systemLocale != nullptr) {
@@ -1170,6 +1175,7 @@ int main(int argc, char **argv) {
}
} catch (...) {}
}
#endif
#if defined(_WIN32) && defined(_MSC_VER)
TCHAR buf[2] { 0 };