BREAKING CHANGE: Load default performances from performance/001_Default (#895)

BREAKING CHANGE: Load default performances from performance/001_Default
rather than performance/
Closes #893, #894
pull/897/head
probonopd 2 weeks ago committed by GitHub
parent e6aab61920
commit 1199230c73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 16
      src/performanceconfig.cpp

@ -33,7 +33,6 @@ LOGMODULE ("Performance");
#define PERFORMANCE_DIR "performance" #define PERFORMANCE_DIR "performance"
#define DEFAULT_PERFORMANCE_FILENAME "performance.ini" #define DEFAULT_PERFORMANCE_FILENAME "performance.ini"
#define DEFAULT_PERFORMANCE_NAME "Default" #define DEFAULT_PERFORMANCE_NAME "Default"
#define DEFAULT_PERFORMANCE_BANK_NAME "Default"
CPerformanceConfig::CPerformanceConfig (FATFS *pFileSystem) CPerformanceConfig::CPerformanceConfig (FATFS *pFileSystem)
: m_Properties (DEFAULT_PERFORMANCE_FILENAME, pFileSystem) : m_Properties (DEFAULT_PERFORMANCE_FILENAME, pFileSystem)
@ -1168,10 +1167,6 @@ bool CPerformanceConfig::ListPerformanceBanks()
} }
unsigned nNumBanks = 0; unsigned nNumBanks = 0;
// Add in the default performance directory as the first bank
m_PerformanceBankName[0] = DEFAULT_PERFORMANCE_BANK_NAME;
nNumBanks = 1;
m_nLastPerformanceBank = 0; m_nLastPerformanceBank = 0;
// List directories with names in format 01_Perf Bank Name // List directories with names in format 01_Perf Bank Name
@ -1277,10 +1272,7 @@ std::string CPerformanceConfig::GetPerformanceBankName(unsigned nBankID)
{ {
return m_PerformanceBankName[nBankID]; return m_PerformanceBankName[nBankID];
} }
else return "";
{
return DEFAULT_PERFORMANCE_BANK_NAME;
}
} }
std::string CPerformanceConfig::AddPerformanceBankDirName(unsigned nBankID) std::string CPerformanceConfig::AddPerformanceBankDirName(unsigned nBankID)
@ -1290,12 +1282,6 @@ std::string CPerformanceConfig::AddPerformanceBankDirName(unsigned nBankID)
{ {
// Performance Banks directories in format "001_Bank Name" // Performance Banks directories in format "001_Bank Name"
std::string Index; std::string Index;
if (nBankID == 0)
{
// Legacy: Bank 1 is the default performance directory
return "";
}
if (nBankID < 9) if (nBankID < 9)
{ {
Index = "00" + std::to_string(nBankID+1); Index = "00" + std::to_string(nBankID+1);

Loading…
Cancel
Save