Skip to content

Commit

Permalink
SDL_vitatouch.c: Fixed the incorrect touch device IDs
Browse files Browse the repository at this point in the history
- Begining of device ID with 0 violates the SDL's specification that means the 0 is an error, invalid, failure, etc. But on Vita here it's an actual device...
- Replacing 0 and 1 with 1 and 2 to resolve this violation.
  • Loading branch information
Wohlstand authored and slouken committed Aug 14, 2024
1 parent 764c44d commit dd6c663
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/video/vita/SDL_vitatouch.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ void VITA_InitTouch(void)
}

// Support passing both front and back touch devices in events
SDL_AddTouch((SDL_TouchID)0, SDL_TOUCH_DEVICE_DIRECT, "Front");
SDL_AddTouch((SDL_TouchID)1, SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, "Back");
SDL_AddTouch((SDL_TouchID)1, SDL_TOUCH_DEVICE_DIRECT, "Front");
SDL_AddTouch((SDL_TouchID)2, SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, "Back");
}

void VITA_QuitTouch(void)
Expand Down

0 comments on commit dd6c663

Please sign in to comment.