mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-20 23:36:31 +08:00
skip localization on windows
This commit is contained in:
parent
049c5f400d
commit
7a98427aa1
|
@ -38,9 +38,7 @@
|
||||||
#include "preferences.h"
|
#include "preferences.h"
|
||||||
#include "commonutil.h"
|
#include "commonutil.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifndef _WIN32
|
||||||
#include <windows.h>
|
|
||||||
#else
|
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -108,17 +106,7 @@ static void showBanner_logo(LogoMode mode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint8_t detect_current_lang(void) {
|
static uint8_t detect_current_lang(void) {
|
||||||
#ifdef _WIN32
|
#ifndef _WIN32
|
||||||
const char* lang[LOCALE_NAME_MAX_LENGTH];
|
|
||||||
if (GetUserDefaultLocaleName(lang, LOCALE_NAME_MAX_LENGTH) > 0) {
|
|
||||||
if (memcmp(lang, "fr", 2) == 0) {
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
if (memcmp(lang, "es", 2) == 0) {
|
|
||||||
return 3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
const char* lang = setlocale(LC_ALL, "");
|
const char* lang = setlocale(LC_ALL, "");
|
||||||
if (lang == NULL) {
|
if (lang == NULL) {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue