int COGLGraphicsContext::ToggleFullscreen() { if(SDL_WM_ToggleFullScreen(m_pScreen) == 1) { m_bWindowed = 1 - m_bWindowed; if(m_bWindowed) SetWindowMode(); else SetFullscreenMode(); } return m_bWindowed?0:1; }
int COGLGraphicsContext::ToggleFullscreen() { if (CoreVideo_ToggleFullScreen() == M64ERR_SUCCESS) { m_bWindowed = !m_bWindowed; if(m_bWindowed) SetWindowMode(); else SetFullscreenMode(); } return m_bWindowed?0:1; }
void UGameUserSettings::ResetToCurrentSettings() { if ( GEngine && GEngine->GameViewport && GEngine->GameViewport->GetWindow().IsValid() ) { //handle the fullscreen setting SetFullscreenMode(GetWindowModeType(GEngine->GameViewport->GetWindow()->GetWindowMode())); //set the current resolution SetScreenResolution(FIntPoint(GSystemResolution.ResX, GSystemResolution.ResY)); // Set the current VSync state static const auto CVar = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.VSync")); SetVSyncEnabled( CVar->GetValueOnGameThread() != 0 ); // Reset to confirmed settings FullscreenMode = LastConfirmedFullscreenMode; ResolutionSizeX = LastUserConfirmedResolutionSizeX; ResolutionSizeY = LastUserConfirmedResolutionSizeY; // Reset the quality settings to the current levels ScalabilityQuality = Scalability::GetQualityLevels(); } }
bool Video::ToggleFullscreenMode() { return SetFullscreenMode(!fullscreen); }