Changeset 53496ab3 in git


Ignore:
Timestamp:
21/01/14 03:50:58 (6 years ago)
Author:
Olly Betts <olly@…>
Branches:
line_contents, master, stereo, travis-osx
Children:
df26b81
Parents:
08e858b
Message:

src/message.c: On Microsoft Windows 2000 and newer, use
GetUserDefaultUILanguage() to get the UI language to use. For older
versions, continue to use GetUserDefaultLCID().

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r08e858b r53496ab3  
     1Tue Jan 21 03:48:07 GMT 2014  Olly Betts <olly@survex.com>
     2
     3        * src/message.c: On Microsoft Windows 2000 and newer, use
     4          GetUserDefaultUILanguage() to get the UI language to use.  For older
     5          versions, continue to use GetUserDefaultLCID().
     6
    17Tue Jan 21 02:29:06 GMT 2014  Olly Betts <olly@survex.com>
    28
  • src/message.c

    r08e858b r53496ab3  
    10521052#endif
    10531053#if OS_WIN32
    1054          locid = GetUserDefaultLCID();
     1054         /* GetUserDefaultUILanguage() requires Microsoft Windows 2000 or
     1055          * newer.  For older versions, we use GetUserDefaultLCID().
     1056          */
     1057         {
     1058            HMODULE win32 = GetModuleHandle(TEXT("kernel32.dll"));
     1059            FARPROC f = GetProcAddress(win32, "GetUserDefaultUILanguage");
     1060            if (f) {
     1061               typedef LANGID (WINAPI *func_GetUserDefaultUILanguage)(void);
     1062               func_GetUserDefaultUILanguage g;
     1063               g = (func_GetUserDefaultUILanguage)f;
     1064               locid = g();
     1065            } else {
     1066               locid = GetUserDefaultLCID();
     1067            }
     1068         }
    10551069         if (locid) {
    10561070            WORD langid = LANGIDFROMLCID(locid);
Note: See TracChangeset for help on using the changeset viewer.