XBOX360 Controller Support...anyone get it to work?
by Adrien C · in Hardware Issues · 10/04/2006 (12:29 am) · 2 replies
Hello, I was wondering if anyone was able to successfully implement XBOX 360 support into their project. I was trying to follow the instructions here:
http://tdn.garagegames.com/wiki/Torque/EngineMods/Xbox360ControllerSupport
But there is little/no follow up support. The instructions were not fully clear to me and I was hoping that someone might be able to explain how they got it to work. I was able to compile the source code, I run the .bat files but nothing seems to happen. When I run the SimpleXInput or the RumbleXInput the game starts up but shows that that none of the controllers are detected. I have searched other threads and have not found a conclusive answer (in fact there are a few posts in the Peripherals forums alluding to this problem but no clear answer--so I figured I would straight up ask as I would think I am not the only one running into this problem/who does not understand the instructions). Is there any info (links, threads) that will show in detail exactly what one has to do to implement 360 controller support to their project?
I have already checked out these threads relating to this subject:
http://www.garagegames.com/mg/forums/result.thread.php?qt=45325
http://tdn.garagegames.com/wiki/Torque/EngineMods/Xbox360ControllerSupport
But there is little/no follow up support. The instructions were not fully clear to me and I was hoping that someone might be able to explain how they got it to work. I was able to compile the source code, I run the .bat files but nothing seems to happen. When I run the SimpleXInput or the RumbleXInput the game starts up but shows that that none of the controllers are detected. I have searched other threads and have not found a conclusive answer (in fact there are a few posts in the Peripherals forums alluding to this problem but no clear answer--so I figured I would straight up ask as I would think I am not the only one running into this problem/who does not understand the instructions). Is there any info (links, threads) that will show in detail exactly what one has to do to implement 360 controller support to their project?
I have already checked out these threads relating to this subject:
http://www.garagegames.com/mg/forums/result.thread.php?qt=45325
About the author
#2
Download those two files and make sure you have the latest DirectX SDK (mine's February 2007). I needed xinput.h it said, so I googled to see how I could include the DirectX SDK and this thread came up: http://www.ogre3d.org/phpBB2/viewtopic.php?p=190729&sid=1b5c60c71bbf09ab972b9b9b18c77eec
So just do as it says if you're having that problem and put "$(DXSDK_DIR)include" to your project's include directory search path and "$(DXSDK_DIR)lib\x86" to its library directory search path.
After that you'll get this error:
guiCanvas.obj : error LNK2019: unresolved external symbol "public: static void __cdecl Input::setCursorPos(int,int)" (?setCursorPos@Input@@SAXHH@Z) referenced in function
"public: virtual void __thiscall GuiCanvas::setCursorPos(class Point2I const &)" (?setCursorPos@GuiCanvas@@UAEXABVPoint2I@@@Z)
so go to engine>gui>core and find Input::setCursorPos( cursorPt.x, cursorPt.y ); and comment it out. I can't seem to find anything bad about doing this, starter.fps works fine and most importantly SimpleXInput and RumbleXInput work now! To run those just copy the folders to your example file and change the $defaultGame in main.cfg to be the names of those.
It's interesting that the left rumble motor is so much stronger than the right motor.
02/18/2007 (12:22 am)
I got it to work if you're interested. I know this is an old thread, but I couldn't find the solution anywhere and hopefully this can help someone out in the future. It took me a while because I'm a complete beginner at this stuff. I'm using Visual C++ 2005 Express Edition, torque 1.5, and a wireless 360 controller with the receiver.Download those two files and make sure you have the latest DirectX SDK (mine's February 2007). I needed xinput.h it said, so I googled to see how I could include the DirectX SDK and this thread came up: http://www.ogre3d.org/phpBB2/viewtopic.php?p=190729&sid=1b5c60c71bbf09ab972b9b9b18c77eec
So just do as it says if you're having that problem and put "$(DXSDK_DIR)include" to your project's include directory search path and "$(DXSDK_DIR)lib\x86" to its library directory search path.
After that you'll get this error:
guiCanvas.obj : error LNK2019: unresolved external symbol "public: static void __cdecl Input::setCursorPos(int,int)" (?setCursorPos@Input@@SAXHH@Z) referenced in function
"public: virtual void __thiscall GuiCanvas::setCursorPos(class Point2I const &)" (?setCursorPos@GuiCanvas@@UAEXABVPoint2I@@@Z)
so go to engine>gui>core and find Input::setCursorPos( cursorPt.x, cursorPt.y ); and comment it out. I can't seem to find anything bad about doing this, starter.fps works fine and most importantly SimpleXInput and RumbleXInput work now! To run those just copy the folders to your example file and change the $defaultGame in main.cfg to be the names of those.
It's interesting that the left rumble motor is so much stronger than the right motor.
Torque Owner Herald Richeson