MainFrame: upgrade the default profile logic.
This commit is contained in:
parent
9c74f672dd
commit
20c35c8d8e
1 changed files with 11 additions and 2 deletions
|
@ -78,14 +78,23 @@ EvtMainFrame::EvtMainFrame(wxWindow* parent):
|
|||
return;
|
||||
}
|
||||
|
||||
std::size_t default_profile = 0;
|
||||
int counter = 0;
|
||||
|
||||
for(const Profile& p : _profileManager.profiles()) {
|
||||
if(p.valid()) {
|
||||
_profileChoice->Append(wxString::Format("%s%s", p.companyName(), p.type() == ProfileType::Demo ? " (Demo)" : ""));
|
||||
|
||||
if(p.type() == ProfileType::FullGame && default_profile == 0) {
|
||||
default_profile = counter;
|
||||
}
|
||||
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
|
||||
_profileManager.setProfile(0);
|
||||
_profileChoice->SetSelection(0);
|
||||
_profileManager.setProfile(default_profile);
|
||||
_profileChoice->SetSelection(default_profile);
|
||||
|
||||
_massManager.emplace(_profileManager.profileDirectory(),
|
||||
_profileManager.currentProfile()->steamId(),
|
||||
|
|
Loading…
Reference in a new issue