diff options
author | CrystalPT <CrystalPT@svn> | 2010-10-06 02:08:55 +0000 |
---|---|---|
committer | CrystalPT <CrystalPT@svn> | 2010-10-06 02:08:55 +0000 |
commit | 2d952a38750fc288c62ad37356952db4fe06cdff (patch) | |
tree | bdd9be046f3c7add9ceb05f8d3022fef6bbdac0e | |
parent | c083db9248606bd9fdb340f39c1e2fdf6b8b0cf9 (diff) |
[WIN32] fixed sample C# EventClient lib. Typo + button up not generated
(cherry picked from commit 7857b8a114a9745cb702946daf2d1d94f945cbf3)
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/Dharma@34481 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r-- | tools/EventClients/lib/c#/EventClient.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/EventClients/lib/c#/EventClient.cs b/tools/EventClients/lib/c#/EventClient.cs index 11c938f697..8d9f21b501 100644 --- a/tools/EventClients/lib/c#/EventClient.cs +++ b/tools/EventClients/lib/c#/EventClient.cs @@ -118,7 +118,15 @@ namespace XBMC if (socket != null) Disconnect();
uniqueToken = UID;
socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
+
+// For compilation with .net framework 1.0 or 1.1
+// define the FRAMEWORK_1_x conditional compilation constant in the project
+// or add /define:FRAMEWORK_1_x to the csc.exe command line
+#if FRAMEWORK_1_x
socket.Connect(Dns.GetHostByName(Address).AddressList[0].ToString(), Port);
+#else
+ socket.Connect(Address, Port);
+#endif
return true;
}
catch
@@ -382,7 +390,7 @@ namespace XBMC Flags |= ButtonFlagsType.BTN_USE_AMOUNT;
}
- if ((Flags & ButtonFlagsType.BTN_DOWN) == 0 || (Flags & ButtonFlagsType.BTN_UP) == 0)
+ if ((Flags & ButtonFlagsType.BTN_DOWN) == 0 && (Flags & ButtonFlagsType.BTN_UP) == 0)
Flags |= ButtonFlagsType.BTN_DOWN;
byte[] payload = new byte[Button.Length + DeviceMap.Length + 8];
|