Skip to content

Commit

Permalink
no longer sending touch events to osx and no mouse events to ios
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbro committed Oct 11, 2012
1 parent 9d9cdd9 commit 2335f87
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/ofxBlud.mm
Original file line number Diff line number Diff line change
Expand Up @@ -105,21 +105,23 @@ int luaErrorHandler(lua_State *L)
printf("%s\n", lua_tostring(luaVM, -1));
}


ofAddListener(ofEvents().keyPressed, this, &ofxBlud::keyPressed);
ofAddListener(ofEvents().keyReleased, this, &ofxBlud::keyReleased);

// touch events
#if defined TARGET_OF_IPHONE
ofAddListener(ofEvents().touchDown, this, &ofxBlud::touchDown);
ofAddListener(ofEvents().touchUp, this, &ofxBlud::touchUp);
ofAddListener(ofEvents().touchMoved, this, &ofxBlud::touchMoved);
ofAddListener(ofEvents().touchDoubleTap, this, &ofxBlud::touchDoubleTap);

ofAddListener(ofEvents().keyPressed, this, &ofxBlud::keyPressed);
ofAddListener(ofEvents().keyReleased, this, &ofxBlud::keyReleased);

#else
// mouse events
ofAddListener(ofEvents().mousePressed, this, &ofxBlud::mousePressed);
ofAddListener(ofEvents().mouseReleased, this, &ofxBlud::mouseReleased);
ofAddListener(ofEvents().mouseMoved, this, &ofxBlud::mouseMoved);
ofAddListener(ofEvents().mouseDragged, this, &ofxBlud::mouseDragged);
#endif
// sys events
ofAddListener(ofEvents().draw, this, &ofxBlud::draw);
ofAddListener(ofEvents().update, this, &ofxBlud::update);
Expand Down

0 comments on commit 2335f87

Please sign in to comment.