/// <summary> /// Disposes any platform-specific resources. /// </summary> partial void DisposePlatformResources() { lock (typeof(UltravioletApplication)) { Instance = null; Native.SDL_SetDynamicMain(IntPtr.Zero); mainProcDelegate = null; mainProcPtr = IntPtr.Zero; } SafeDispose.DisposeRef(ref orientationDidChangeNotification); }
/// <summary> /// Initializes the application's state. /// </summary> partial void InitializeApplication() { lock (typeof(UltravioletApplication)) { if (Instance != null) { throw new InvalidOperationException(); } Instance = this; mainProcDelegate = new Func <Int32>(SDLMainProcThunk); mainProcPtr = Marshal.GetFunctionPointerForDelegate(mainProcDelegate); Native.SDL_SetDynamicMain(mainProcPtr); } UIApplication.Main(new String[0], null, nameof(UltravioletAppDelegate)); }