Ejemplo n.º 1
0
        public void PressQueue(DualShockState state, string[] properties, int delay = 150)
        {
            if (properties == null)
            {
                return;
            }

            if (!Host.IsRunning || Host.IsPaused)
            {
                return;
            }

            CurrentQueueState.PatchState(state);
            ReleaseQueueState.Add(new KeyValuePair <string[], DateTime>(properties, DateTime.Now.AddMilliseconds(delay)));
            FlushQueue();
        }
Ejemplo n.º 2
0
        private void ReleaseQueue()
        {
            DateTime now       = DateTime.Now;
            bool     didChange = false;

            // Check the queue for releasing buttons
            foreach (var r in ReleaseQueueState)
            {
                if (now >= r.Value)
                {
                    CurrentQueueState.Release(r.Key);
                    didChange = true;
                }
            }

            // Flush queue if did change
            if (didChange)
            {
                FlushQueue();
            }
        }