engine: client: do not repeatedly check cl_charset value, use generic Con_UtfProcessChar
This commit is contained in:
parent
24f4d410ce
commit
2e0fc3e4c1
2 changed files with 2 additions and 8 deletions
|
@ -1055,10 +1055,7 @@ static qboolean OSK_KeyEvent( int key, int down )
|
|||
break;
|
||||
}
|
||||
|
||||
if( !Q_stricmp( cl_charset.string, "utf-8" ) )
|
||||
ch = (unsigned char)osk.curbutton.val;
|
||||
else
|
||||
ch = Con_UtfProcessCharForce( (unsigned char)osk.curbutton.val );
|
||||
ch = Con_UtfProcessChar((byte)osk.curbutton.val );
|
||||
|
||||
if( !ch )
|
||||
break;
|
||||
|
|
|
@ -363,10 +363,7 @@ static void SDLash_InputEvent( SDL_TextInputEvent input )
|
|||
{
|
||||
int ch;
|
||||
|
||||
if( !Q_stricmp( cl_charset.string, "utf-8" ) )
|
||||
ch = (unsigned char)*text;
|
||||
else
|
||||
ch = Con_UtfProcessCharForce( (unsigned char)*text );
|
||||
ch = Con_UtfProcessChar((byte)*text );
|
||||
|
||||
if( !ch )
|
||||
continue;
|
||||
|
|
Loading…
Add table
Reference in a new issue