[Orxonox-commit 3373] r8060 - in code/branches/mac_osx/src/external/ois: linux mac
rgrieder at orxonox.net
rgrieder at orxonox.net
Sat Mar 12 05:43:13 CET 2011
Author: rgrieder
Date: 2011-03-12 05:43:12 +0100 (Sat, 12 Mar 2011)
New Revision: 8060
Modified:
code/branches/mac_osx/src/external/ois/linux/LinuxKeyboard.cpp
code/branches/mac_osx/src/external/ois/mac/MacKeyboard.cpp
Log:
Reverted some changes to OIS v1.3.
@Kevin: hope this is OK for you.
Modified: code/branches/mac_osx/src/external/ois/linux/LinuxKeyboard.cpp
===================================================================
--- code/branches/mac_osx/src/external/ois/linux/LinuxKeyboard.cpp 2011-03-12 04:17:19 UTC (rev 8059)
+++ code/branches/mac_osx/src/external/ois/linux/LinuxKeyboard.cpp 2011-03-12 04:43:12 UTC (rev 8060)
@@ -283,7 +283,9 @@
while( XPending(display) > 0 )
{
- XNextEvent(display, &event); if(KeyPress == event.type)
+ XNextEvent(display, &event);
+
+ if(KeyPress == event.type)
{
unsigned int character = 0;
Modified: code/branches/mac_osx/src/external/ois/mac/MacKeyboard.cpp
===================================================================
--- code/branches/mac_osx/src/external/ois/mac/MacKeyboard.cpp 2011-03-12 04:17:19 UTC (rev 8059)
+++ code/branches/mac_osx/src/external/ois/mac/MacKeyboard.cpp 2011-03-12 04:43:12 UTC (rev 8060)
@@ -198,12 +198,20 @@
UniChar text[10];
char macChar;
+ // TODO clean this up
if (mTextMode == Unicode)
{
//get string size
UInt32 stringsize;
+ //status = GetEventParameter( theEvent, 'kuni', typeUnicodeText, NULL, 0, &stringsize, NULL);
+ //status = GetEventParameter( theEvent, 'kuni', typeUnicodeText, NULL, sizeof(UniChar)*10, NULL, &text );
status = GetEventParameter( theEvent, 'kuni', typeUnicodeText, NULL, sizeof(UniChar) * 10, &stringsize, &text );
+ std::cout << "String length: " << stringsize << std::endl;
+ //wstring unitext;
+ //for (int i=0;i<10;i++) unitext += (wchar_t)text[i];
+ //wcout << "Unicode out: " << unitext << endl;
+
if(stringsize > 0)
{
// for each unicode char, send an event
More information about the Orxonox-commit
mailing list