2011-04-06, 13:14
Hello all,
I am writing a remote for XBMC in C++ running on Ubuntu 10.04 on the latest source code.
The xbmcclient.h code works well with various buttons that I tried, but the CPacketMOUSE sends the cursor to 0,0 (upper left corner) regardless of the X,Y parameters passed. I tried with and w/o a UID parameter.
Is any initialization required? Is there a bug in the library client code maybe?
Thanks,
Michael
I am writing a remote for XBMC in C++ running on Ubuntu 10.04 on the latest source code.
The xbmcclient.h code works well with various buttons that I tried, but the CPacketMOUSE sends the cursor to 0,0 (upper left corner) regardless of the X,Y parameters passed. I tried with and w/o a UID parameter.
Is any initialization required? Is there a bug in the library client code maybe?
Thanks,
Michael
Code:
CPacketHELO HeloPackage("Example Mouse", ICON_PNG, "../../icons/mouse.png");
HeloPackage.Send(sockfd, my_addr, UID);
sleep(5);
for(int i = 0; i < 65536; i+=2000)
{
CPacketMOUSE mouse(i,i);
mouse.Send(sockfd, my_addr, UID);
sleep(1);
printf("%d\n",i);
}
// BYE is not required since XBMC would have shut down
CPacketBYE bye; // CPacketPing if you want to ping
bye.Send(sockfd, my_addr, UID);