Author Topic: Help! Combining two graphics tablets into a single joystick device.  (Read 28211 times)

Renate

  • Frequent Contributor
  • ****
  • Posts: 97
Re: Help! Combining two graphics tablets into a single joystick device.
« Reply #15 on: December 23, 2020, 04:54:58 pm »
I'm sorry to say that I'm so stone age that I don't even know what language that is.
It looks like you are trying to read from all the event streams sequentially.

Code: [Select]
struct pollfd pfds[4];

pfds[0].fd=open(etc...);
pfds[0].events=POLLIN|POLLERR;
pfds[1].fd=open(etc...);
pfds[1].events=POLLIN|POLLERR;
pfds[2].fd=open(etc...);
pfds[2].events=POLLIN|POLLERR;
pfds[3].fd=open(etc...);
pfds[3].events=POLLIN|POLLERR;

for(;;)
{
   code=poll(pfds, 4, -1);
   if (code<0) break;

   for(i=0;i<4;i++)
   {
      if (pfds[i].revents&(POLLIN|POLLERR))
      {
         /* read & do something */
      }
   }
}

Here's how we do it with stone axes.



houshi

  • Member
  • ***
  • Posts: 1
Re: Help! Combining two graphics tablets into a single joystick device.
« Reply #16 on: May 15, 2022, 11:53:06 pm »
Is this method feasible?I have two XPPen ( https://www.xp-pen.com ) drawing tablets and I want to have a try with them.