Exemplo n.º 1
0
 protected override unsafe void UpdateBufferValuesFromElementInfo(ref ElementInfo elementInfo, IntPtr vertexPtr, IntPtr indexPtr, int vertexOffset)
 {
     fixed(SpriteDrawInfo *drawInfo = &elementInfo.DrawInfo)
     {
         NativeInvoke.UpdateBufferValuesFromElementInfo(new IntPtr(drawInfo), vertexPtr, indexPtr, vertexOffset);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Suspends current thread for a <see cref="sleepTime"/>.
        /// </summary>
        /// <param name="sleepTime">The duration of sleep.</param>
        public static void Sleep(TimeSpan sleepTime)
        {
            var ms = (long)sleepTime.TotalMilliseconds;

            if (ms < 0 || ms > int.MaxValue)
            {
                throw new ArgumentOutOfRangeException(nameof(sleepTime), "Sleep time must be a duration less than '2^31 - 1' milliseconds.");
            }
            NativeInvoke.Sleep((int)ms);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Suspends current thread for a <see cref="sleepTimeInMillis"/>.
 /// </summary>
 /// <param name="sleepTimeInMillis">The duration of sleep in milliseconds.</param>
 public static void Sleep(int sleepTimeInMillis)
 {
     NativeInvoke.Sleep(sleepTimeInMillis);
 }
Exemplo n.º 4
0
 static XInputChecker()
 {
     NativeInvoke.PreLoad();
 }