Example #1
0
        /// <summary>
        /// Creates a new instance of the GlfwProvider class.
        /// </summary>
        static SdlProvider()
        {
            SDL = new Lazy <Sdl>
                  (
                () =>
            {
                var sdl = Sdl.GetApi();
                if (SetMainReady)
                {
                    sdl.SetMainReady();
                }

                sdl.Init(InitFlags);
                sdl.ThrowError();

                return(sdl);
            }
                  );
        }
Example #2
0
        /// <summary>
        /// Unloads the loaded <see cref="SDL" /> interface implementation.
        /// </summary>
        public static void Unload()
        {
            SDL.Value.Quit();
            SDL = new Lazy <Sdl>
                  (
                () =>
            {
                var sdl = Sdl.GetApi();
                if (SetMainReady)
                {
                    sdl.SetMainReady();
                }

                sdl.Init(InitFlags);
                sdl.ThrowError();

                return(sdl);
            }
                  );
        }