mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 21:44:31 +00:00
[NTUSER] Implement GetSystemMetrics.SM_DBCSENABLED (#4317)
- Add UserIsDBCSEnabled helper function. - Support SM_DBCSENABLED value of GetSystemMetrics function. CORE-11700
This commit is contained in:
parent
df8c74e78b
commit
c339105b0d
|
@ -14,6 +14,21 @@ static BOOL Setup = FALSE;
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* 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
|
BOOL
|
||||||
NTAPI
|
NTAPI
|
||||||
InitMetrics(VOID)
|
InitMetrics(VOID)
|
||||||
|
@ -150,7 +165,7 @@ InitMetrics(VOID)
|
||||||
piSysMet[SM_NETWORK] = 3;
|
piSysMet[SM_NETWORK] = 3;
|
||||||
piSysMet[SM_SLOWMACHINE] = 0;
|
piSysMet[SM_SLOWMACHINE] = 0;
|
||||||
piSysMet[SM_SECURE] = 0;
|
piSysMet[SM_SECURE] = 0;
|
||||||
piSysMet[SM_DBCSENABLED] = 0;
|
piSysMet[SM_DBCSENABLED] = UserIsDBCSEnabled();
|
||||||
piSysMet[SM_SHOWSOUNDS] = gspv.bShowSounds;
|
piSysMet[SM_SHOWSOUNDS] = gspv.bShowSounds;
|
||||||
piSysMet[SM_MIDEASTENABLED] = 0;
|
piSysMet[SM_MIDEASTENABLED] = 0;
|
||||||
piSysMet[SM_CMONITORS] = 1;
|
piSysMet[SM_CMONITORS] = 1;
|
||||||
|
@ -183,6 +198,9 @@ UserGetSystemMetrics(ULONG Index)
|
||||||
ASSERT(Setup);
|
ASSERT(Setup);
|
||||||
TRACE("UserGetSystemMetrics(%lu)\n", Index);
|
TRACE("UserGetSystemMetrics(%lu)\n", Index);
|
||||||
|
|
||||||
|
if (Index == SM_DBCSENABLED)
|
||||||
|
return UserIsDBCSEnabled();
|
||||||
|
|
||||||
/* Get metrics from array */
|
/* Get metrics from array */
|
||||||
if (Index < SM_CMETRICS)
|
if (Index < SM_CMETRICS)
|
||||||
{
|
{
|
||||||
|
@ -206,5 +224,4 @@ UserGetSystemMetrics(ULONG Index)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Reference in a new issue