private void GameForm_ResizeBeginActions(SDL.SDL_WindowEvent e) { if (Graphics.GraphicsDevice.Platform == Graphics.GraphicsPlatform.Vulkan && OriginalSize.HasValue) { // resizing not supported, return to original resolution Size = cachedSize = OriginalSize.Value; } else { isUserResizing = true; PauseRendering?.Invoke(this, EventArgs.Empty); cachedSize = Size; } }
private void GameForm_MinimizedActions(SDL.SDL_WindowEvent e) { previousWindowState = FormWindowState.Minimized; PauseRendering?.Invoke(this, EventArgs.Empty); }
private void GameForm_ResizeBeginActions(SDL.SDL_WindowEvent e) { isUserResizing = true; cachedSize = Size; PauseRendering?.Invoke(this, EventArgs.Empty); }
/// <summary> /// Raises the Pause Rendering event. /// </summary> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void OnPauseRendering(EventArgs e) { PauseRendering?.Invoke(this, e); }
/// <summary> /// Raises the Pause Rendering event. /// </summary> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void OnPauseRendering(EventArgs e) { GameBase.PauseRendering = true; PauseRendering?.Invoke(this, e); }