diff --git a/BBGE/ActionMapper.cpp b/BBGE/ActionMapper.cpp index 23af97e..d864ca1 100644 --- a/BBGE/ActionMapper.cpp +++ b/BBGE/ActionMapper.cpp @@ -46,12 +46,12 @@ ActionMapper::ActionMapper() cleared = false; inputEnabled = true; inUpdate = false; - InputMapper::RegisterActionMapper(this); + IInputMapper::RegisterActionMapper(this); } ActionMapper::~ActionMapper() { - InputMapper::UnregisterActionMapper(this); + IInputMapper::UnregisterActionMapper(this); clearCreatedEvents(); } diff --git a/BBGE/InputMapper.cpp b/BBGE/InputMapper.cpp index 5ae5d36..a550fc9 100644 --- a/BBGE/InputMapper.cpp +++ b/BBGE/InputMapper.cpp @@ -57,7 +57,7 @@ IInputMapper::IInputMapper() IInputMapper::~IInputMapper() { - InputSystem::addMapper(this); + InputSystem::removeMapper(this); } // ------------------ @@ -69,7 +69,6 @@ InputMapper::InputMapper(int playerID) InputMapper::~InputMapper() { - InputSystem::removeMapper(this); } static float rescale(float t, float lower, float upper, float rangeMin, float rangeMax) diff --git a/BBGE/InputMapper.h b/BBGE/InputMapper.h index b3a182b..489be6d 100644 --- a/BBGE/InputMapper.h +++ b/BBGE/InputMapper.h @@ -48,7 +48,7 @@ class InputMapper : public IInputMapper { public: InputMapper(int playerID); - ~InputMapper(); + virtual ~InputMapper(); bool acceptMouse; int acceptMouseID; // -1: accept all, otherwise: that id