From e3e5b700df9cb2d6138e35bf0def178524c46c14 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Tue, 25 Jun 2024 00:25:17 -0400 Subject: confine locale weirdness to windows only (#317) --- src/abaddon.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/abaddon.cpp') diff --git a/src/abaddon.cpp b/src/abaddon.cpp index 7f4281d..b0a1a56 100644 --- a/src/abaddon.cpp +++ b/src/abaddon.cpp @@ -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 }; -- cgit v1.2.3