// Revert changes - setting new video resolution must be done from Draw call, because when called // from Update while game isn't active (alt-tabed or minimized) it will fail on weird XNA exceptions void RevertChanges() { // Revert and change video mode to OLD settings MyVideoModeManager.BeginChangeVideoMode(true, m_settingsOld.VideoAdapter, m_settingsOld.VideoMode, m_settingsOld.FullScreen, m_settingsOld.VerticalSync, m_settingsOld.HardwareCursor, m_settingsOld.RenderQuality, m_settingsOld.FieldOfView, false, OnVideoModeChanged); }
public void OnApplyClick(MyGuiControlButton sender) { // Update NEW settings bool somethingChanged = UpdateSettings(m_settingsNew); // Change video mode to new one if (somethingChanged) { MyVideoModeManager.BeginChangeVideoMode(true, m_settingsNew.VideoAdapter, m_settingsNew.VideoMode, m_settingsNew.FullScreen, m_settingsNew.VerticalSync, m_settingsNew.HardwareCursor, m_settingsNew.RenderQuality, m_settingsNew.FieldOfView, false, OnVideoModeChangedAndComfirm); } else { CloseScreen(); } }