Skip to content

Commit

Permalink
Fix touch input coordinates for SDL>=2.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
scotty007 committed Aug 20, 2020
1 parent fcca784 commit f35eb5a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/player/SDLTouchInputDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ void SDLTouchInputDevice::onTouchEvent(SDLWindow* pWindow, const SDL_Event& sdlE
IntPoint winSize(Player::get()->getRootNode()->getSize());
#ifdef _WIN32
IntPoint pos = normPos * glm::vec2(winSize);
#elif SDL_VERSION_ATLEAST(2, 0, 7)
IntPoint pos = normPos * glm::vec2(winSize);
#else
IntPoint pos = normPos;
#endif
Expand Down

0 comments on commit f35eb5a

Please sign in to comment.