aboutsummaryrefslogtreecommitdiff
path: root/tools/EventClients
diff options
context:
space:
mode:
authorCrystalPT <CrystalPT@svn>2010-09-21 07:21:44 +0000
committerCrystalPT <CrystalPT@svn>2010-09-21 07:21:44 +0000
commit1a4d08f55f5c898c6cefcaacc2a9c352d8139d80 (patch)
treeb35469135fbf2115af5b832a37fa98076f4fe304 /tools/EventClients
parent7087b6f6d96e1b3680103fa31cc819324d1ff3f5 (diff)
[WIN32] fixed sample C# EventClient lib. Typo + button up not generated
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@34025 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'tools/EventClients')
-rw-r--r--tools/EventClients/lib/c#/EventClient.cs10
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];