Commit fca48f5a authored by teella's avatar teella

added peroid work around for OSX reported by Ori Hanegby


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1283 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 09e767a9
...@@ -500,6 +500,12 @@ void CIrrDeviceMacOSX::postKeyEvent(void *event,irr::SEvent &ievent,bool pressed ...@@ -500,6 +500,12 @@ void CIrrDeviceMacOSX::postKeyEvent(void *event,irr::SEvent &ievent,bool pressed
if (iter != _keycodes.end()) mkey = (*iter).second; if (iter != _keycodes.end()) mkey = (*iter).second;
else else
{ {
// workaround for period character
if (c == 0x2E)
{
mkey = irr::KEY_PERIOD;
mchar = '.';
} else {
cStr = (unsigned char *)[str cStringUsingEncoding:NSWindowsCP1252StringEncoding]; cStr = (unsigned char *)[str cStringUsingEncoding:NSWindowsCP1252StringEncoding];
if (cStr != NULL && strlen((char*)cStr) > 0) if (cStr != NULL && strlen((char*)cStr) > 0)
{ {
...@@ -515,6 +521,7 @@ void CIrrDeviceMacOSX::postKeyEvent(void *event,irr::SEvent &ievent,bool pressed ...@@ -515,6 +521,7 @@ void CIrrDeviceMacOSX::postKeyEvent(void *event,irr::SEvent &ievent,bool pressed
} }
} }
} }
}
ievent.EventType = irr::EET_KEY_INPUT_EVENT; ievent.EventType = irr::EET_KEY_INPUT_EVENT;
ievent.KeyInput.Key = (irr::EKEY_CODE)mkey; ievent.KeyInput.Key = (irr::EKEY_CODE)mkey;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment