projects
/
premotedroid-server-perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d209fbf
)
fix bit-endian 16 bit unpack for move
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 19 Sep 2010 16:54:15 +0000
(18:54 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 19 Sep 2010 16:54:15 +0000
(18:54 +0200)
premotedroid-server.pl
patch
|
blob
|
history
diff --git
a/premotedroid-server.pl
b/premotedroid-server.pl
index
25ae497
..
0d7c6b0
100755
(executable)
--- a/
premotedroid-server.pl
+++ b/
premotedroid-server.pl
@@
-45,7
+45,7
@@
while ( my $client = $sock->accept() ) {
warn "# command: $command\n";
if ( $command == MOUSE_MOVE ) {
read $client, my $move, 4;
warn "# command: $command\n";
if ( $command == MOUSE_MOVE ) {
read $client, my $move, 4;
- my ( $x, $y ) = unpack 's
s', $move;
+ my ( $x, $y ) = unpack 's
>s>', $move; # big-endian 16 bit
warn "MOVE $x $y\n";
} elsif ( $command == MOUSE_CLICK ) {
read $client, my $b, 2;
warn "MOVE $x $y\n";
} elsif ( $command == MOUSE_CLICK ) {
read $client, my $b, 2;