gdk: Re-enable code using Device.NumAxes

As the Device.NumAxes is back now, we can re-enable the pieces of code
that were disabled during the inital port.
This commit is contained in:
Bertrand Lorentz 2012-06-28 17:49:05 -04:00
parent 15486fda75
commit 64a79b5621
2 changed files with 0 additions and 8 deletions

View File

@ -50,21 +50,17 @@ namespace Gdk {
public double[] Axes {
get {
double[] result = null;
#if FIXME30
IntPtr axes = Native.axes;
if (axes != IntPtr.Zero) {
result = new double [Device.NumAxes];
Marshal.Copy (axes, result, 0, result.Length);
}
#endif
return result;
}
set {
NativeStruct native = Native;
#if FIXME30
if (native.axes == IntPtr.Zero || value.Length != Device.NumAxes)
throw new InvalidOperationException ();
#endif
Marshal.Copy (value, 0, native.axes, value.Length);
}
}

View File

@ -51,21 +51,17 @@ namespace Gdk {
public double[] Axes {
get {
double[] result = null;
#if FIXME30
IntPtr axes = Native.axes;
if (axes != IntPtr.Zero) {
result = new double [Device.NumAxes];
Marshal.Copy (axes, result, 0, result.Length);
}
#endif
return result;
}
set {
NativeStruct native = Native;
#if FIXME30
if (native.axes == IntPtr.Zero || value.Length != Device.NumAxes)
throw new InvalidOperationException ();
#endif
Marshal.Copy (value, 0, native.axes, value.Length);
}
}