mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-11 06:32:10 +08:00
engine: client: do not repeatedly check cl_charset value, use generic Con_UtfProcessChar
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user