From 76424950e373d3b04ac3dd13019151bfba3e8423 Mon Sep 17 00:00:00 2001 From: sumuel Date: Mon, 17 Aug 2026 20:44:55 +0000 Subject: Add the files --- src/detection/locale/locale_windows.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/detection/locale/locale_windows.c (limited to 'src/detection/locale/locale_windows.c') diff --git a/src/detection/locale/locale_windows.c b/src/detection/locale/locale_windows.c new file mode 100644 index 0000000..b247365 --- /dev/null +++ b/src/detection/locale/locale_windows.c @@ -0,0 +1,16 @@ +#include "detection/locale/locale.h" +#include "common/windows/unicode.h" + +#include + +const char* ffDetectLocale(FFstrbuf* result) { + wchar_t name[LOCALE_NAME_MAX_LENGTH]; + int size = GetUserDefaultLocaleName(name, LOCALE_NAME_MAX_LENGTH); + if (size <= 1) { // including '\0' + return "GetUserDefaultLocaleName() failed"; + } + + ffStrbufSetNWS(result, (uint32_t) size - 1, name); + + return NULL; +} -- cgit v1.2.3