Ejemplo n.º 1
0
 public unsafe void Unacquire()
 {
     if (acquiredWindowHandle != IntPtr.Zero)
     {
         if (mouseDevice != null)
         {
             IDirectInputDevice8.Unacquire(mouseDevice);
         }
         acquiredWindowHandle = IntPtr.Zero;
     }
 }
        protected unsafe override void OnShutdown()
        {
            if (directInputDevice != null)
            {
                IDirectInputDevice8.Unacquire(directInputDevice);
                IDirectInputDevice8.Release(directInputDevice);
                directInputDevice = null;
            }

            if (deviceDataBuffer != IntPtr.Zero)
            {
                NativeUtility.Free(deviceDataBuffer);
                deviceDataBuffer = IntPtr.Zero;
            }
        }