[Scummvm-git-logs] scummvm master -> c38600410e7ea5cf0bbb4edf11ccafa49f332f05

sev- sev at scummvm.org
Sat Sep 21 17:10:21 CEST 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
c38600410e SCI: Support for Cyrillic input


Commit: c38600410e7ea5cf0bbb4edf11ccafa49f332f05
    https://github.com/scummvm/scummvm/commit/c38600410e7ea5cf0bbb4edf11ccafa49f332f05
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2019-09-21T17:07:15+02:00

Commit Message:
SCI: Support for Cyrillic input

Changed paths:
    engines/sci/event.cpp


diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp
index 7828bb5..2700f54 100644
--- a/engines/sci/event.cpp
+++ b/engines/sci/event.cpp
@@ -323,6 +323,16 @@ SciEvent EventManager::getScummVMEvent() {
 				break;
 			}
 		}
+
+		if (g_sci->getLanguage() == Common::RU_RUS) {
+			// Convert UTF16 to CP866
+			if (input.character >= 0x400 && input.character <= 0x4ff) {
+				if (input.character >= 0x440)
+					input.character = input.character - 0x410 + 0xb0;
+				else
+					input.character = input.character - 0x410 + 0x80;
+			}
+		}
 	}
 
 	// TODO: Leaky abstractions from SDL should not be handled in game engines!





More information about the Scummvm-git-logs mailing list