diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2024-06-25 02:22:22 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2024-06-25 02:22:22 -0400 |
commit | f6c00e6c11d5e2e316cb3aef3b611eda0ce2b683 (patch) | |
tree | 9c1f2f4a175b594f4e1f1605abe79856b7d9094a /src/abaddon.cpp | |
parent | e65174f5aab55fe3917dd52f97b1b00a07d30d38 (diff) | |
parent | 53ad3903ee8e32197dd91d479415ad95f1e6269e (diff) | |
download | abaddon-portaudio-f6c00e6c11d5e2e316cb3aef3b611eda0ce2b683.tar.gz abaddon-portaudio-f6c00e6c11d5e2e316cb3aef3b611eda0ce2b683.zip |
Merge branch 'master' into stages
Diffstat (limited to 'src/abaddon.cpp')
-rw-r--r-- | src/abaddon.cpp | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/src/abaddon.cpp b/src/abaddon.cpp index b568f47..653327c 100644 --- a/src/abaddon.cpp +++ b/src/abaddon.cpp @@ -1,5 +1,4 @@ #include "abaddon.hpp" -#include <cstdlib> #include <memory> #include <spdlog/spdlog.h> #include <spdlog/cfg/env.h> @@ -1154,35 +1153,15 @@ void Abaddon::on_window_hide() { } } -// clang-format off - -#ifdef __GLIBC__ - #ifndef _GNU_SOURCE - #define _GNU_SOURCE - #include <features.h> - #ifndef __USE_GNU - #define __MUSL__ - #endif - #undef _GNU_SOURCE - #else - #include <features.h> - #ifndef __USE_GNU - #define __MUSL__ - #endif - #endif -#endif - -// clang-format on - int main(int argc, char **argv) { -#ifdef __MUSL__ - char env[] = "LANG=C"; - putenv(env); -#endif - - 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) { @@ -1196,6 +1175,7 @@ int main(int argc, char **argv) { } } catch (...) {} } +#endif #if defined(_WIN32) && defined(_MSC_VER) TCHAR buf[2] { 0 }; |