|
@@ -83,9 +83,11 @@ SDL_Touch *SDL_GetTouch(SDL_TouchID id)
|
|
|
{
|
|
|
int index = SDL_GetTouchIndex(id);
|
|
|
if (index < 0 || index >= SDL_num_touch) {
|
|
|
- if (SDL_GetVideoDevice()->ResetTouch != NULL) {
|
|
|
+ if ((id == SDL_MOUSE_TOUCHID) || (id == SDL_PEN_TOUCHID)) {
|
|
|
+ // this is a virtual touch device, but for some reason they aren't added to the system. Just ignore it.
|
|
|
+ } else if ( SDL_GetVideoDevice()->ResetTouch) {
|
|
|
SDL_SetError("Unknown touch id %d, resetting", (int)id);
|
|
|
- (SDL_GetVideoDevice()->ResetTouch)(SDL_GetVideoDevice());
|
|
|
+ SDL_GetVideoDevice()->ResetTouch(SDL_GetVideoDevice());
|
|
|
} else {
|
|
|
SDL_SetError("Unknown touch device id %d, cannot reset", (int)id);
|
|
|
}
|