From d7e458cb2f780276f43aa980281f7160abc19238 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 20 Oct 2002 02:33:32 +0000 Subject: [PATCH] Fixed "can't switch to windowed" (hopefully). Fixed smpackage: individual files selected not added to zip. --- stepmania/src/ScreenEvaluation.cpp | 2 +- stepmania/src/StepMania.cpp | 48 ++++++++++++++++++++---- stepmania/src/smpackage/smpackageDlg.cpp | 3 +- 3 files changed, 44 insertions(+), 9 deletions(-) diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index 7c2edea876..4749463c37 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -614,7 +614,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) { case GRADE_AA: case GRADE_AAA: - this->SendScreenMessage( SM_PlayCheer, 3 ); + this->SendScreenMessage( SM_PlayCheer, 2.5f ); break; } diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index cdb0840ef3..05c03cf4c2 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -968,7 +968,7 @@ void ApplyGraphicOptions() ); // - // If the requested resolution doesn't work, keep switching until we find one that does. + // If the requested modes doesn't work, keep switching until we find one that does. // if( DISPLAY->SwitchDisplayMode(bWindowed, iDisplayWidth, iDisplayHeight, iDisplayBPP, iRefreshRate, PREFSMAN->m_bVsync ) ) goto success; @@ -978,6 +978,16 @@ void ApplyGraphicOptions() if( DISPLAY->SwitchDisplayMode(bWindowed, iDisplayWidth, iDisplayHeight, iDisplayBPP, iRefreshRate, PREFSMAN->m_bVsync ) ) goto success; + LOG->Trace( "Failed again. Try 16 BPP." ); + iDisplayBPP = 16; + if( DISPLAY->SwitchDisplayMode(bWindowed, iDisplayWidth, iDisplayHeight, iDisplayBPP, iRefreshRate, PREFSMAN->m_bVsync ) ) + goto success; + + LOG->Trace( "Failed again. Try 32 BPP." ); + iDisplayBPP = 32; + if( DISPLAY->SwitchDisplayMode(bWindowed, iDisplayWidth, iDisplayHeight, iDisplayBPP, iRefreshRate, PREFSMAN->m_bVsync ) ) + goto success; + LOG->Trace( "We failed. Try full screen with same params." ); bWindowed = false; if( DISPLAY->SwitchDisplayMode(bWindowed, iDisplayWidth, iDisplayHeight, iDisplayBPP, iRefreshRate, PREFSMAN->m_bVsync ) ) @@ -998,6 +1008,27 @@ void ApplyGraphicOptions() if( DISPLAY->SwitchDisplayMode(bWindowed, iDisplayWidth, iDisplayHeight, iDisplayBPP, iRefreshRate, PREFSMAN->m_bVsync ) ) goto success; + LOG->Trace( "Failed again. Try 32 BPP." ); + iDisplayBPP = 32; + if( DISPLAY->SwitchDisplayMode(bWindowed, iDisplayWidth, iDisplayHeight, iDisplayBPP, iRefreshRate, PREFSMAN->m_bVsync ) ) + goto success; + + LOG->Trace( "Failed again. Try 16 BPP." ); + iDisplayBPP = 16; + if( DISPLAY->SwitchDisplayMode(bWindowed, iDisplayWidth, iDisplayHeight, iDisplayBPP, iRefreshRate, PREFSMAN->m_bVsync ) ) + goto success; + + LOG->Trace( "Failed again. Try 640x480." ); + iDisplayWidth = 640; + iDisplayHeight = 480; + if( DISPLAY->SwitchDisplayMode(bWindowed, iDisplayWidth, iDisplayHeight, iDisplayBPP, iRefreshRate, PREFSMAN->m_bVsync ) ) + goto success; + + LOG->Trace( "We failed. Try full screen with same params." ); + bWindowed = false; + if( DISPLAY->SwitchDisplayMode(bWindowed, iDisplayWidth, iDisplayHeight, iDisplayBPP, iRefreshRate, PREFSMAN->m_bVsync ) ) + goto success; + LOG->Trace( "Failed again. Try 16 BPP." ); iDisplayBPP = 16; if( DISPLAY->SwitchDisplayMode(bWindowed, iDisplayWidth, iDisplayHeight, iDisplayBPP, iRefreshRate, PREFSMAN->m_bVsync ) ) @@ -1008,15 +1039,18 @@ void ApplyGraphicOptions() if( DISPLAY->SwitchDisplayMode(bWindowed, iDisplayWidth, iDisplayHeight, iDisplayBPP, iRefreshRate, PREFSMAN->m_bVsync ) ) goto success; - LOG->Trace( "Failed again. Try 640x480." ); - iDisplayWidth = 640; - iDisplayHeight = 480; + LOG->Trace( "We failed. Try windowed with same params." ); + bWindowed = false; if( DISPLAY->SwitchDisplayMode(bWindowed, iDisplayWidth, iDisplayHeight, iDisplayBPP, iRefreshRate, PREFSMAN->m_bVsync ) ) goto success; - LOG->Trace( "Failed again. Try 320x240." ); - iDisplayWidth = 320; - iDisplayHeight = 240; + LOG->Trace( "Failed again. Try 32 BPP." ); + iDisplayBPP = 32; + if( DISPLAY->SwitchDisplayMode(bWindowed, iDisplayWidth, iDisplayHeight, iDisplayBPP, iRefreshRate, PREFSMAN->m_bVsync ) ) + goto success; + + LOG->Trace( "Failed again. Try 16 BPP." ); + iDisplayBPP = 16; if( DISPLAY->SwitchDisplayMode(bWindowed, iDisplayWidth, iDisplayHeight, iDisplayBPP, iRefreshRate, PREFSMAN->m_bVsync ) ) goto success; diff --git a/stepmania/src/smpackage/smpackageDlg.cpp b/stepmania/src/smpackage/smpackageDlg.cpp index b7b0adbd35..068298376d 100644 --- a/stepmania/src/smpackage/smpackageDlg.cpp +++ b/stepmania/src/smpackage/smpackageDlg.cpp @@ -264,8 +264,9 @@ bool ExportPackage( CString sPackageName, const CStringArray& asDirectoriesToExp for( int i=0; i