[vlc-devel] [PATCH 1/2] macosx: remove support for the language argument
Marvin Scholz
epirat07 at gmail.com
Wed Mar 4 16:24:37 CET 2020
---
bin/darwinvlc.m | 37 +++++++++++--------------------------
1 file changed, 11 insertions(+), 26 deletions(-)
diff --git a/bin/darwinvlc.m b/bin/darwinvlc.m
index 7ddbdd19fd..fbefc316a6 100644
--- a/bin/darwinvlc.m
+++ b/bin/darwinvlc.m
@@ -229,33 +229,18 @@ int main(int i_argc, const char *ppsz_argv[])
/* overwrite system language on Mac */
char *lang = NULL;
- for (int i = 0; i < i_argc; i++) {
- if (!strncmp(ppsz_argv[i], "--language", 10)) {
- lang = strstr(ppsz_argv[i], "=");
- ppsz_argv++, i_argc--;
- continue;
- }
- }
- if (lang && strncmp( lang, "auto", 4 )) {
- char tmp[11];
- snprintf(tmp, 11, "LANG%s", lang);
- putenv(tmp);
- }
-
- if (!lang) {
- CFStringRef language;
- language = (CFStringRef)CFPreferencesCopyAppValue(CFSTR("language"),
- kCFPreferencesCurrentApplication);
- if (language) {
- lang = FromCFString(language, kCFStringEncodingUTF8);
- if (strncmp( lang, "auto", 4 )) {
- char tmp[11];
- snprintf(tmp, 11, "LANG=%s", lang);
- putenv(tmp);
- }
- free(lang);
- CFRelease(language);
+ CFStringRef language;
+ language = (CFStringRef)CFPreferencesCopyAppValue(CFSTR("language"),
+ kCFPreferencesCurrentApplication);
+ if (language) {
+ lang = FromCFString(language, kCFStringEncodingUTF8);
+ if (strncmp( lang, "auto", 4 )) {
+ char tmp[11];
+ snprintf(tmp, 11, "LANG=%s", lang);
+ putenv(tmp);
}
+ free(lang);
+ CFRelease(language);
}
ppsz_argv++; i_argc--; /* skip executable path */
--
2.21.1 (Apple Git-122.3)
More information about the vlc-devel
mailing list