diff --git a/Demos/OpenGL/DemoApplication.h b/Demos/OpenGL/DemoApplication.h index 595934a27..f8dc597b4 100644 --- a/Demos/OpenGL/DemoApplication.h +++ b/Demos/OpenGL/DemoApplication.h @@ -197,7 +197,9 @@ public: ///callback methods by glut virtual void keyboardCallback(unsigned char key, int x, int y); - + + virtual void keyboardUpCallback(unsigned char key, int x, int y) {} + virtual void specialKeyboard(int key, int x, int y){} virtual void specialKeyboardUp(int key, int x, int y){} diff --git a/Demos/OpenGL/GlutStuff.cpp b/Demos/OpenGL/GlutStuff.cpp index 4a4aff5bb..cf79b5966 100644 --- a/Demos/OpenGL/GlutStuff.cpp +++ b/Demos/OpenGL/GlutStuff.cpp @@ -27,6 +27,11 @@ static void glutKeyboardCallback(unsigned char key, int x, int y) gDemoApplication->keyboardCallback(key,x,y); } +static void glutKeyboardUpCallback(unsigned char key, int x, int y) +{ + gDemoApplication->keyboardUpCallback(key,x,y); +} + static void glutSpecialKeyboardCallback(int key, int x, int y) { gDemoApplication->specialKeyboard(key,x,y); @@ -82,6 +87,7 @@ int glutmain(int argc, char **argv,int width,int height,const char* title,DemoAp gDemoApplication->myinit(); glutKeyboardFunc(glutKeyboardCallback); + glutKeyboardUpFunc(glutKeyboardUpCallback); glutSpecialFunc(glutSpecialKeyboardCallback); glutSpecialUpFunc(glutSpecialKeyboardUpCallback); @@ -98,4 +104,4 @@ int glutmain(int argc, char **argv,int width,int height,const char* title,DemoAp return 0; } -#endif //_WINDOWS \ No newline at end of file +#endif //_WINDOWS diff --git a/src/BulletCollision/CollisionDispatch/btCollisionObject.h b/src/BulletCollision/CollisionDispatch/btCollisionObject.h index 0d5b78864..c4968c9b7 100644 --- a/src/BulletCollision/CollisionDispatch/btCollisionObject.h +++ b/src/BulletCollision/CollisionDispatch/btCollisionObject.h @@ -393,7 +393,7 @@ public: /// Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold void setCcdMotionThreshold(btScalar ccdMotionThreshold) { - m_ccdMotionThreshold = ccdMotionThreshold*ccdMotionThreshold; + m_ccdMotionThreshold = ccdMotionThreshold; } ///users can point to their objects, userPointer is not used by Bullet