Exemple #1
0
        /// <summary>
        /// Uninitializes the SDK if it has been initialized.
        /// </summary>
        /// <remarks>
        /// <span style="color: red;">Manual manipulation of the SDK state is
        /// <strong>not supported by the CoraleStudios team</strong> and may
        /// result in <emph>undefined behaviour</emph>. Usage of this method is
        /// <strong>at your own risk</strong>. Usage of SDK functions while
        /// the SDK is in an <emph>uninitialized</emph> state is <strong>highly
        /// advised against</strong> and <emph>WILL</emph> result in catastrophic
        /// failure. <strong>YOU HAVE BEEN WARNED</strong>.</span>
        /// </remarks>
        public void Uninitialize()
        {
            if (!Initialized)
            {
                return;
            }

            ((Device)Keyboard).DeleteCurrentEffect();
            ((Device)Mouse).DeleteCurrentEffect();
            ((Device)Keypad).DeleteCurrentEffect();
            ((Device)Mousepad).DeleteCurrentEffect();
            ((Device)Headset).DeleteCurrentEffect();

            Unregister();
            NativeWrapper.UnInit();

            Initialized = false;
        }