https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c339105b0dca35e01424a2bb6b78a114e3cd742b
commit c339105b0dca35e01424a2bb6b78a114e3cd742b Author: Katayama Hirofumi MZ <[email protected]> AuthorDate: Sun Jan 30 11:23:22 2022 +0900 Commit: GitHub <[email protected]> CommitDate: Sun Jan 30 11:23:22 2022 +0900 [NTUSER] Implement GetSystemMetrics.SM_DBCSENABLED (#4317) - Add UserIsDBCSEnabled helper function. - Support SM_DBCSENABLED value of GetSystemMetrics function. CORE-11700 --- win32ss/user/ntuser/metric.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/win32ss/user/ntuser/metric.c b/win32ss/user/ntuser/metric.c index cae66b0807d..9b8d71da2a6 100644 --- a/win32ss/user/ntuser/metric.c +++ b/win32ss/user/ntuser/metric.c @@ -14,6 +14,21 @@ static BOOL Setup = FALSE; /* FUNCTIONS *****************************************************************/ +BOOL APIENTRY UserIsDBCSEnabled(VOID) +{ + switch (PRIMARYLANGID(gusLanguageID)) + { + case LANG_CHINESE: + case LANG_JAPANESE: + case LANG_KOREAN: + //case LANG_VIETNAMESE: // Are you using double-byte character strings? + return TRUE; + + default: + return FALSE; + } +} + BOOL NTAPI InitMetrics(VOID) @@ -150,7 +165,7 @@ InitMetrics(VOID) piSysMet[SM_NETWORK] = 3; piSysMet[SM_SLOWMACHINE] = 0; piSysMet[SM_SECURE] = 0; - piSysMet[SM_DBCSENABLED] = 0; + piSysMet[SM_DBCSENABLED] = UserIsDBCSEnabled(); piSysMet[SM_SHOWSOUNDS] = gspv.bShowSounds; piSysMet[SM_MIDEASTENABLED] = 0; piSysMet[SM_CMONITORS] = 1; @@ -183,6 +198,9 @@ UserGetSystemMetrics(ULONG Index) ASSERT(Setup); TRACE("UserGetSystemMetrics(%lu)\n", Index); + if (Index == SM_DBCSENABLED) + return UserIsDBCSEnabled(); + /* Get metrics from array */ if (Index < SM_CMETRICS) { @@ -206,5 +224,4 @@ UserGetSystemMetrics(ULONG Index) return 0; } - /* EOF */
