mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
[NTUSER] Support SM_DBCSENABLED and SM_IMMENABLED (#4806)
- Don't set SRVINFO_CICERO_ENABLED flag because we don't have Cicero support. - Improve UserGetSystemMetrics for SM_DBCSENABLED and SM_IMMENABLED. - Delete useless UserIsDBCSEnabled function. CORE-11700
This commit is contained in:
parent
58983061e9
commit
7a8ddbf147
1 changed files with 13 additions and 18 deletions
|
@ -14,20 +14,6 @@ static BOOL Setup = FALSE;
|
|||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
BOOL APIENTRY UserIsDBCSEnabled(VOID)
|
||||
{
|
||||
switch (PRIMARYLANGID(gusLanguageID))
|
||||
{
|
||||
case LANG_CHINESE:
|
||||
case LANG_JAPANESE:
|
||||
case LANG_KOREAN:
|
||||
return TRUE;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
BOOL
|
||||
NTAPI
|
||||
InitMetrics(VOID)
|
||||
|
@ -164,12 +150,12 @@ InitMetrics(VOID)
|
|||
piSysMet[SM_NETWORK] = 3;
|
||||
piSysMet[SM_SLOWMACHINE] = 0;
|
||||
piSysMet[SM_SECURE] = 0;
|
||||
piSysMet[SM_DBCSENABLED] = UserIsDBCSEnabled();
|
||||
piSysMet[SM_DBCSENABLED] = NLS_MB_CODE_PAGE_TAG;
|
||||
piSysMet[SM_SHOWSOUNDS] = gspv.bShowSounds;
|
||||
piSysMet[SM_MIDEASTENABLED] = 0;
|
||||
piSysMet[SM_CMONITORS] = 1;
|
||||
piSysMet[SM_SAMEDISPLAYFORMAT] = 1;
|
||||
piSysMet[SM_IMMENABLED] = 0;
|
||||
piSysMet[SM_IMMENABLED] = NLS_MB_CODE_PAGE_TAG;
|
||||
|
||||
/* Reserved */
|
||||
piSysMet[SM_RESERVED1] = 0;
|
||||
|
@ -183,7 +169,13 @@ InitMetrics(VOID)
|
|||
piSysMet[90] = 0;
|
||||
#endif
|
||||
|
||||
gpsi->dwSRVIFlags |= SRVINFO_CICERO_ENABLED;
|
||||
/*gpsi->dwSRVIFlags |= SRVINFO_CICERO_ENABLED;*/ /* Cicero is not supported yet */
|
||||
|
||||
if (NLS_MB_CODE_PAGE_TAG) /* Is the system multi-byte codepage? */
|
||||
{
|
||||
gpsi->dwSRVIFlags |= (SRVINFO_DBCSENABLED | SRVINFO_IMM32); /* DBCS+IME Support */
|
||||
}
|
||||
|
||||
Setup = TRUE;
|
||||
|
||||
return TRUE;
|
||||
|
@ -198,7 +190,10 @@ UserGetSystemMetrics(ULONG Index)
|
|||
TRACE("UserGetSystemMetrics(%lu)\n", Index);
|
||||
|
||||
if (Index == SM_DBCSENABLED)
|
||||
return UserIsDBCSEnabled();
|
||||
return !!(gpsi->dwSRVIFlags & SRVINFO_DBCSENABLED);
|
||||
|
||||
if (Index == SM_IMMENABLED)
|
||||
return !!(gpsi->dwSRVIFlags & SRVINFO_IMM32);
|
||||
|
||||
/* Get metrics from array */
|
||||
if (Index < SM_CMETRICS)
|
||||
|
|
Loading…
Reference in a new issue