Esempio n. 1
0
        private void SendLayoutChange(string layout, InputControlLayoutChange change)
        {
            if (m_Subscribers == null)
            {
                return;
            }

            Message msg;

            switch (change)
            {
            case InputControlLayoutChange.Added:
            case InputControlLayoutChange.Replaced:
                var message = NewLayoutMsg.Create(this, layout);
                if (message == null)
                {
                    return;
                }
                msg = message.Value;
                break;

            case InputControlLayoutChange.Removed:
                msg = RemoveLayoutMsg.Create(this, layout);
                break;

            default:
                return;
            }

            Send(msg);
        }
Esempio n. 2
0
        private void SendLayoutChange(string layout, InputControlLayoutChange change)
        {
            if (m_Subscribers == null)
            {
                return;
            }

            // Don't mirror remoted layouts to other remotes.
            if (layout.StartsWith(kRemoteLayoutNamespacePrefix))
            {
                return;
            }

            Message msg;

            switch (change)
            {
            case InputControlLayoutChange.Added:
            case InputControlLayoutChange.Replaced:
                var message = NewLayoutMsg.Create(this, layout);
                if (message == null)
                {
                    return;
                }
                msg = message.Value;
                break;

            case InputControlLayoutChange.Removed:
                msg = RemoveLayoutMsg.Create(this, layout);
                break;

            default:
                return;
            }

            Send(msg);
        }