ivansafrin/Polycode — pull request #112 by dannywarren (2012-06-18 09:04:12+00:00)
Title: Added winxp/vista fallback for multitouch functions

* the "GetTouchInputInfo" function in "user32.lib" is only available on windows 7 or greater, see: http://msdn.microsoft.com/en-us/library/windows/desktop/dd371582(v=vs.85).aspx

* polycode will still build on winxp, but any code that uses it fails at runtime with the error: "The procedure entry point GetTouchInputInfo could not be located in the dynamic link library user32.lib"

* using a preprocessor directive wouldn't be helpful here, as that would require always building two release of polycode and any games that use it (one with multitouch support and one without)

* instead, we can check for the existence of any multitouch functions at runtime and fall back to null behavior if they are not available, as described here: http://msdn.microsoft.com/en-us/library/ms683212(v=vs.85).aspx

* removed WINDOWS_TOUCH_SUPPORT preprocessor directive

* added initTouch() for determining multitouch support at runtime

* added check to handleTouchEvent() to return immediately if multitouch is not supported (this may be not be needed, as multitouch events probably won't fire on a system that doesn't support it, right?)