mirror of https://github.com/stella-emu/stella.git
Merge branch 'feature-highscores' of https://github.com/stella-emu/stella into feature-highscores
This commit is contained in:
commit
db415d0eb9
|
@ -541,10 +541,14 @@ string HighScoresManager::fromPropString(const string& text) const
|
||||||
}
|
}
|
||||||
|
|
||||||
// some ugly formatting
|
// some ugly formatting
|
||||||
char first = result[0];
|
if(result.length())
|
||||||
result = BSPF::toLowerCase(result);
|
{
|
||||||
result[0] = first;
|
char first = result[0];
|
||||||
|
result = BSPF::toLowerCase(result);
|
||||||
|
result[0] = first;
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
// remove leading spaces (especially for empty values)
|
||||||
|
size_t start = result.find_first_not_of(" ");
|
||||||
|
return (start == std::string::npos) ? "" : result.substr(start);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -807,11 +807,14 @@ void GameInfoDialog::loadHighScoresProperties(const Properties& props)
|
||||||
mySpecialAddress->setText(ss.str());
|
mySpecialAddress->setText(ss.str());
|
||||||
|
|
||||||
|
|
||||||
for (uInt32 a = 0; a < instance().highScores().numAddrBytes(info.numDigits, info.trailingZeroes); ++a)
|
for (uInt32 a = 0; a < HSM::MAX_SCORE_ADDR; ++a)
|
||||||
{
|
{
|
||||||
ss.str("");
|
ss.str("");
|
||||||
ss << hex << right //<< setw(HSM::MAX_ADDR_CHARS) << setfill(' ')
|
if(a < instance().highScores().numAddrBytes(info.numDigits, info.trailingZeroes))
|
||||||
<< uppercase << info.scoreAddr[a];
|
{
|
||||||
|
ss << hex << right //<< setw(HSM::MAX_ADDR_CHARS) << setfill(' ')
|
||||||
|
<< uppercase << info.scoreAddr[a];
|
||||||
|
}
|
||||||
myScoreAddress[a]->setText(ss.str());
|
myScoreAddress[a]->setText(ss.str());
|
||||||
}
|
}
|
||||||
updateHighScoresWidgets();
|
updateHighScoresWidgets();
|
||||||
|
|
|
@ -212,7 +212,10 @@ void HighScoresDialog::loadConfig()
|
||||||
label = label.substr(label.length() - 5);
|
label = label.substr(label.length() - 5);
|
||||||
mySpecialLabelWidget->setLabel(label);
|
mySpecialLabelWidget->setLabel(label);
|
||||||
|
|
||||||
myNotesWidget->setLabel("Note: " + instance().highScores().notes());
|
if(!instance().highScores().notes().empty())
|
||||||
|
myNotesWidget->setLabel("Note: " + instance().highScores().notes());
|
||||||
|
else
|
||||||
|
myNotesWidget->setLabel("");
|
||||||
|
|
||||||
if (instance().hasConsole())
|
if (instance().hasConsole())
|
||||||
myMD5 = instance().console().properties().get(PropType::Cart_MD5);
|
myMD5 = instance().console().properties().get(PropType::Cart_MD5);
|
||||||
|
|
Loading…
Reference in New Issue