underdoeg / ofxgamepad Goto Github PK
View Code? Open in Web Editor NEWgamepad support for openframeworks 007
gamepad support for openframeworks 007
Gamepad support for OpenFrameworks On linux it's stable and fully functional, using the native <linux/joystick.h>. Window and Mac Versions use OIS, which is also available on linux as well. To switch you simply have to #define USE_OIS. Mac and Windows should define USE_OIS automatically.
I've loved using this addon in the past, but I can't get it to work with Yosemite.
I suspect the issue is that libOIS.a was not compiled for my system, but I'm not sure how to go about doing that or where to find a compiled version.
I grabbed the version over here (http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Building+Ogre3D+1.9+Statically+in+Mac+OS+X+(Yosemite)) and replacing my libOIS.a with the one in that packet helped, but I still get errors, mostly about createInputSystems, but I can't track it down.
Here's what XCode had to say:
Undefined symbols for architecture x86_64:
"OIS::InputManager::createInputSystem(std::multimap<std::string, std::string, std::lessstd::string, std::allocator<std::pair<std::string const, std::string> > >&)", referenced from:
ofxGamepadHandler::updatePadList() in ofxGamepadHandler.o
"OIS::InputManager::createInputObject(OIS::Type, bool, std::string const&)", referenced from:
ofxGamepadHandler::updatePadList() in ofxGamepadHandler.o
If you know how to resolve this or have a version working in Yosemite, I would be extremely appreciative. Thanks.
Add a class that has functions like buttonPressed(int button, ofxGamepad* pad) that can be inherited and then added to a gamepad (ofxGamepad->addListener(this) )
because for now, the ofxGamepad only fires event with ofNotify
Trigger an event, when a new gamepad is connected
Hi, how is the behavior with code::blocks ? because I get those compilations troubles and I do not find something to link at specific to code::blocks.
obj\Release\addons\ofxGamePad\src\ofxGamepadHandler.o:ofxGamepadHandler.cpp|| undefined reference to OIS::InputManager::createInputSystem(std::multimap<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > >&)'| obj\Release\addons\ofxGamePad\src\ofxGamepadHandler.o:ofxGamepadHandler.cpp|| undefined reference to
OIS::InputManager::getNumberOfDevices(OIS::Type)'|
obj\Release\addons\ofxGamePad\src\ofxGamepadHandler.o:ofxGamepadHandler.cpp|| undefined reference to OIS::InputManager::createInputObject(OIS::Type, bool, std::string const&)'| obj\Release\addons\ofxGamePad\src\ofxGamepadHandler.o:ofxGamepadHandler.cpp|| undefined reference to
OIS::InputManager::destroyInputSystem(OIS::InputManager*)'|
obj\Release\addons\ofxGamePad\src\ofxGamepadOIS.o:ofxGamepadOIS.cpp|| undefined reference to OIS::JoyStick::getNumberOfComponents(OIS::ComponentType) const'| obj\Release\addons\ofxGamePad\src\ofxGamepadOIS.o:ofxGamepadOIS.cpp|| undefined reference to
OIS::JoyStick::getNumberOfComponents(OIS::ComponentType) const'|
obj\Release\addons\ofxGamePad\src\ofxGamepadOIS.o:ofxGamepadOIS.cpp|| undefined reference to OIS::ForceFeedback::getSupportedEffects() const'| obj\Release\addons\ofxGamePad\src\ofxGamepadOIS.o:ofxGamepadOIS.cpp|| undefined reference to
OIS::Effect::getEffectTypeName(OIS::Effect::EType)'|
obj\Release\addons\ofxGamePad\src\ofxGamepadOIS.o:ofxGamepadOIS.cpp|| undefined reference to `OIS::InputManager::createInputObject(OIS::Type, bool, std::string const&)'|
||=== Build finished: 9 errors, 21 warnings (3 minutes, 58 seconds) ===|
Hi There,
Great addon!!
Small question. Everything worked perfectly on my Ubuntu machine, but I want to get it to work on a Raspberry Pi as well.
The thing is: analog buttons / sticks of my Thrustmaster Dual Analog 3 all work as expected, but the buttons do not.
Could you point me in the direction where I can solve this myself?
Kind regards,
Peter Goes
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.