From f3fc5a8b6103f7f8b256fdceee8412e0182a5a8f Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Sun, 7 Sep 2008 19:58:37 +0000 Subject: [PATCH] BGE bug #17574 fixed: GE Text input doesn't register in 2.47. Force registration of keyboard sensor with no link as this is typically the setting for key logging. --- source/gameengine/Converter/KX_ConvertSensors.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/gameengine/Converter/KX_ConvertSensors.cpp b/source/gameengine/Converter/KX_ConvertSensors.cpp index 74819431858..f16855955ff 100644 --- a/source/gameengine/Converter/KX_ConvertSensors.cpp +++ b/source/gameengine/Converter/KX_ConvertSensors.cpp @@ -781,6 +781,13 @@ void BL_ConvertSensors(struct Object* blenderobject, "logic may be incorrect\n", sens->name, i+1, sens->totlinks, blenderobject->id.name+2); } } + // special case: Keyboard sensor with no link + // this combination is usually used for key logging. + if (sens->type == SENS_KEYBOARD && sens->totlinks == 0) { + // Force the registration so that the sensor runs + gamesensor->IncLink(); + } + // done with gamesensor gamesensor->Release();