Remove prefs for 'AllowExtraPlayerOptions', 'CustomMaxSizeMB', and 'CustomMaxStepSize...
authorMarc Cannon <vyhdycokio@gmail.com>
Wed, 2 Jan 2013 05:57:01 +0000 (05:57 +0000)
committerMarc Cannon <vyhdycokio@gmail.com>
Wed, 2 Jan 2013 05:57:01 +0000 (05:57 +0000)
src/PrefsManager.cpp
src/PrefsManager.h
src/Profile.cpp
src/ScreenOptionsMasterPrefs.cpp
src/Song.cpp

index 0384c19..837261d 100755 (executable)
@@ -203,9 +203,6 @@ PrefsManager::PrefsManager() :
        m_fCustomsLoadTimeout   ( "CustomsLoadTimeout", 5.0f ),
 
        m_iCustomMaxSeconds     ( "CustomMaxSeconds", 120 ),
-       m_iCustomMaxSizeMB      ( "CustomMaxSizeMB", 5 ),
-       m_iCustomMaxStepsSizeKB ( "CustomMaxStepSizeKB", 100 ),
-       m_bAllowExtraPlayerOptions ( "AllowExtraPlayerOptions", false ),
 
        m_bCustomCourses        ( "CourseEdits", false ),
 
index 39bda5a..33ec202 100755 (executable)
@@ -181,11 +181,7 @@ public:
        Preference<bool>        m_bCustomSongPreviews;
        Preference<int>         m_iCustomsLoadMax;
        Preference<float>       m_fCustomsLoadTimeout;
-
        Preference<int>         m_iCustomMaxSeconds;
-       Preference<int>         m_iCustomMaxSizeMB;
-       Preference<int>         m_iCustomMaxStepsSizeKB;
-       Preference<bool>        m_bAllowExtraPlayerOptions;
 
        Preference<bool>        m_bCustomCourses;
 
index eb99ce7..755c87a 100755 (executable)
@@ -1093,11 +1093,6 @@ Profile::LoadResult Profile::LoadEditableDataFromDir( CString sDir )
        if( m_iWeightPounds != 0 )
                CLAMP( m_iWeightPounds, 20, 1000 );
 
-       if ( ! PREFSMAN->m_bAllowExtraPlayerOptions )
-       {
-               LOG->Warn( "AllowExtraPlayerOptions turned off, skipping Extra.ini" );
-               return success;
-       }
        if ( FILEMAN->GetFileSizeInBytes(efn) > MAX_EDITABLE_INI_SIZE_BYTES )
        {
                LOG->Warn( "The file '%s' is unreasonably large.  It won't be loaded.", efn.c_str() );
index 888b99a..40a11a0 100755 (executable)
@@ -320,12 +320,6 @@ static void CustomMaxSeconds( int &sel, bool ToSel, const ConfOption *pConfOptio
        MoveMap( sel, PREFSMAN->m_iCustomMaxSeconds, ToSel, mapping, ARRAYLEN(mapping) );
 }
 
-static void CustomMaxSizeMB( int &sel, bool ToSel, const ConfOption *pConfOption )
-{
-       const int mapping[] = { 3, 4, 5, 6, 7, 8, 9, 10, 0 };
-       MoveMap( sel, PREFSMAN->m_iCustomMaxSizeMB, ToSel, mapping, ARRAYLEN(mapping) );
-}
-
 static void CustomsLoadTimeout( int &sel, bool ToSel, const ConfOption *pConfOption )
 {
        const float mapping[] = { 5.0f, 10.0f, 15.0f, 20.0f, 25.0f, 30.0f, 45.0f, 60.0f };
@@ -338,8 +332,6 @@ static void CustomsLoadMax( int &sel, bool ToSel, const ConfOption *pConfOption
        MoveMap( sel, PREFSMAN->m_iCustomsLoadMax, ToSel, mapping, ARRAYLEN(mapping) );
 }
 
-MOVE( AllowExtraPlayerOptions, PREFSMAN->m_bAllowExtraPlayerOptions );
-
 static void MarvelousTiming( int &sel, bool ToSel, const ConfOption *pConfOption )
 {
        const PrefsManager::MarvelousTiming mapping[] = { PrefsManager::MARVELOUS_NEVER, PrefsManager::MARVELOUS_COURSES_ONLY, PrefsManager::MARVELOUS_EVERYWHERE };
@@ -604,12 +596,9 @@ static void InitializeConfOptions()
        ADD( ConfOption( "UnlockSystem",                                UnlockSystem,           "OFF","ON" ) );
        ADD( ConfOption( "SongEdits",                                   SongEdits,              "OFF", "ON" ) );
        ADD( ConfOption( "CourseEdits",                                 CourseEdits,    "OFF", "ON" ) );
-       ADD( ConfOption( "AllowExtraPlayerOptions",                     AllowExtraPlayerOptions,        "OFF", "ON" ) );
        ADD( ConfOption( "CustomMaxSeconds",                            CustomMaxSeconds,       "1:30", "1:45", "2:00", "2:15", "2:30", "2:45", "3:00",
                                                                                                        "3:30", "4:00", "4:30", "5:00", "5:30",
                                                                                                        "6:00", "7:00", "10:00", "UNLIMITED" ) );
-       ADD( ConfOption( "CustomMaxSizeMB",                             CustomMaxSizeMB,        "3MB", "4MB", "5MB", "6MB", "7MB", "8MB", "9MB", "10MB", "UNLIMITED" ) );
-
        ADD( ConfOption( "CustomsLoadTimeout",                          CustomsLoadTimeout,     "5s", "10s", "15s", "20s", "25s", "30s", "45s", "1m" ) );
        ADD( ConfOption( "CustomsLoadMax",                              CustomsLoadMax,         "10", "20", "30", "40", "50", "60", "UNLIMITED" ) );
 
index 1634b98..bcf6a7c 100755 (executable)
@@ -1638,32 +1638,6 @@ bool Song::CheckCustomSong( CString &sError )
                return false;
        }
 
-       // music too big?
-       if( PREFSMAN->m_iCustomMaxSizeMB > 0 )
-       {
-               int iLimit = 1024*1024*PREFSMAN->m_iCustomMaxSizeMB;
-
-               if( FILEMAN->GetFileSizeInBytes(GetMusicPath()) > iLimit )
-               {
-                       sError = ssprintf( "This song is too big.\nThe maximum size is %u MB.", 
-                               (int)PREFSMAN->m_iCustomMaxSizeMB );
-                       return false;
-               }
-       }
-       
-       // SM file too big?
-       if( PREFSMAN->m_iCustomMaxStepsSizeKB > 0 )
-       {
-               int iLimit = 1024*PREFSMAN->m_iCustomMaxStepsSizeKB;
-               
-               if( FILEMAN->GetFileSizeInBytes(GetSongFilePath()) > iLimit )
-               {
-                       sError = ssprintf( "The .SM file is too big.\nMaximum size is %u KB.",
-                               (int)PREFSMAN->m_iCustomMaxStepsSizeKB );
-                       return false;
-               }
-       }
-
        /* we used to use this to test music length, but we only care about steps length.
         * do this anyway, as a simple check to make sure the song can actually load. */
        CString sResult;