Skip to content

Commit

Permalink
UPBGE: Fix mouse sensor.
Browse files Browse the repository at this point in the history
Previously the conversion of the sensors events mode to the input enum was
using a conversion table, but this table was lacking an item which shifted
all the other items.

The shift is removed by adding the missing elements.
  • Loading branch information
panzergame committed Apr 6, 2017
1 parent f780c89 commit 864139f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/gameengine/GameLogic/SCA_MouseSensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ bool SCA_MouseSensor::Evaluate()
case KX_MOUSESENSORMODE_WHEELDOWN:
{
static const SCA_IInputDevice::SCA_EnumInputs convertTable[KX_MOUSESENSORMODE_MAX] = {
SCA_IInputDevice::NOKEY, // KX_MOUSESENSORMODE_NODEF
SCA_IInputDevice::LEFTMOUSE, // KX_MOUSESENSORMODE_LEFTBUTTON
SCA_IInputDevice::MIDDLEMOUSE, // KX_MOUSESENSORMODE_MIDDLEBUTTON
SCA_IInputDevice::RIGHTMOUSE, // KX_MOUSESENSORMODE_RIGHTBUTTON
Expand Down

0 comments on commit 864139f

Please sign in to comment.