Git Product home page Git Product logo

ofxgamepad's Introduction

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.

ofxgamepad's People

Contributors

gahzi avatar joebain avatar markpitchless avatar mcanet avatar underdoeg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ofxgamepad's Issues

OSX Yosemtie

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.

ofxGamepadlistener

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

hot pluggin

Trigger an event, when a new gamepad is connected

Compilation trouble under code::blocks

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 toOIS::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 toOIS::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 toOIS::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 toOIS::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) ===|

Button presses on Raspberry Pi

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.