mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fix for Cyrillic layouts. Again. (by ViSoR)
STOP TO BROKE RUSSIAN GAME git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5833 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -574,18 +574,21 @@ void HandleBeginScreenTextEvent( UINT32 uiKey )
|
||||
// ViSoR (07.01.2012) : Russian and Belarussian layouts
|
||||
//
|
||||
#if defined(RUSSIAN) || defined(BELARUSSIAN)
|
||||
if( ( (DWORD)GetKeyboardLayout(0) & 0xFFFF ) == 0x419) // Russian
|
||||
// ViSoR (02.02.2013): Fix for Cyrillic layouts
|
||||
DWORD threadId = GetWindowThreadProcessId( ghWindow, 0 );
|
||||
DWORD layout = (DWORD)GetKeyboardLayout( threadId ) & 0xFFFF;
|
||||
if( layout == 0x419 ) // Russian
|
||||
{
|
||||
unsigned char TranslationTable[] =
|
||||
" #Ý####ý####á-þ.0123456789ÆæÁ#Þ##ÔÈÑÂÓÀÏÐØÎËÄÜÒÙÇÉÊÛÅÃÌÖ×Íßõ#ú#_¸ôèñâóàïðøîëäüòùçéêûåãìö÷íÿÕ#Ú¨";
|
||||
" #Ý####ý####á-þ.0123456789ÆæÁ#Þ,#ÔÈÑÂÓÀÏÐØÎËÄÜÒÙÇÉÊÛÅÃÌÖ×Íßõ#ú#_¸ôèñâóàïðøîëäüòùçéêûåãìö÷íÿÕ#Ú¨";
|
||||
|
||||
uiKey = TranslateKey( uiKey, TranslationTable );
|
||||
uiKey = GetCyrillicUnicodeChar( uiKey );
|
||||
}
|
||||
else if ( ( (DWORD)GetKeyboardLayout(0) & 0xFFFF ) == 0x423) // Belarussian
|
||||
else if( layout == 0x423 ) // Belarussian
|
||||
{
|
||||
unsigned char TranslationTable[] =
|
||||
" #Ý####ý####á-þ.0123456789ÆæÁ#Þ##Ô²ÑÂÓÀÏÐØÎËÄÜÒ¡ÇÉÊÛÅÃÌÖ×Íßõ#'#_¸ô³ñâóàïðøîëäüò¢çéêûåãìö÷íÿÕ#'¨";
|
||||
" #Ý####ý####á-þ.0123456789ÆæÁ#Þ,#Ô²ÑÂÓÀÏÐØÎËÄÜÒ¡ÇÉÊÛÅÃÌÖ×Íßõ#'#_¸ô³ñâóàïðøîëäüò¢çéêûåãìö÷íÿÕ#'¨";
|
||||
|
||||
uiKey = TranslateKey( uiKey, TranslationTable );
|
||||
uiKey = GetCyrillicUnicodeChar( uiKey );
|
||||
|
||||
Reference in New Issue
Block a user