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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !Q_stricmp( cl_charset.string, "utf-8" ) )
|
ch = Con_UtfProcessChar((byte)osk.curbutton.val );
|
||||||
ch = (unsigned char)osk.curbutton.val;
|
|
||||||
else
|
|
||||||
ch = Con_UtfProcessCharForce( (unsigned char)osk.curbutton.val );
|
|
||||||
|
|
||||||
if( !ch )
|
if( !ch )
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -363,10 +363,7 @@ static void SDLash_InputEvent( SDL_TextInputEvent input )
|
||||||
{
|
{
|
||||||
int ch;
|
int ch;
|
||||||
|
|
||||||
if( !Q_stricmp( cl_charset.string, "utf-8" ) )
|
ch = Con_UtfProcessChar((byte)*text );
|
||||||
ch = (unsigned char)*text;
|
|
||||||
else
|
|
||||||
ch = Con_UtfProcessCharForce( (unsigned char)*text );
|
|
||||||
|
|
||||||
if( !ch )
|
if( !ch )
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Reference in a new issue