Merge branch 'variousSmallFixes'

This commit is contained in:
LPFaint99
2012-02-01 16:50:09 -08:00
22 changed files with 279 additions and 49 deletions

View File

@ -678,11 +678,8 @@ void CFrame::DoOpen(bool Boot)
File::SetCurrentDir(currentDir);
}
if (path.IsEmpty())
return;
// Should we boot a new game or just change the disc?
if (Boot)
if (Boot && !path.IsEmpty())
BootGame(std::string(path.mb_str()));
else
{

View File

@ -78,7 +78,7 @@ void CodeConfigPanel::UpdateCodeList()
gcodes_end = m_gcodes.end();
for (; gcodes_iter!=gcodes_end; ++gcodes_iter)
{
m_listbox_gcodes->Append(wxString::FromAscii(gcodes_iter->name.c_str()));
m_listbox_gcodes->Append(wxString(gcodes_iter->name.c_str(), *wxConvCurrent));
if (gcodes_iter->enabled)
m_listbox_gcodes->Check(m_listbox_gcodes->GetCount()-1, true);
}
@ -111,7 +111,7 @@ void CodeConfigPanel::UpdateInfoBox(wxCommandEvent&)
if (sel > -1)
{
m_infobox.label_name->SetLabel(wxGetTranslation(wxstr_name) + wxString::FromAscii(m_gcodes[sel].name.c_str()));
m_infobox.label_name->SetLabel(wxGetTranslation(wxstr_name) + wxString(m_gcodes[sel].name.c_str(), *wxConvCurrent));
// notes textctrl
m_infobox.textctrl_notes->Clear();
@ -119,10 +119,10 @@ void CodeConfigPanel::UpdateInfoBox(wxCommandEvent&)
notes_iter = m_gcodes[sel].notes.begin(),
notes_end = m_gcodes[sel].notes.end();
for (; notes_iter!=notes_end; ++notes_iter)
m_infobox.textctrl_notes->AppendText(wxString::FromAscii(notes_iter->c_str()));
m_infobox.textctrl_notes->AppendText(wxString(notes_iter->c_str(), *wxConvCurrent));
m_infobox.textctrl_notes->ScrollLines(-99); // silly
m_infobox.label_creator->SetLabel(wxGetTranslation(wxstr_creator) + wxString::FromAscii(m_gcodes[sel].creator.c_str()));
m_infobox.label_creator->SetLabel(wxGetTranslation(wxstr_creator) + wxString(m_gcodes[sel].creator.c_str(), *wxConvCurrent));
// add codes to info listbox
std::vector<GeckoCode::Code>::const_iterator
@ -151,9 +151,18 @@ void CodeConfigPanel::DownloadCodes(wxCommandEvent&)
std::string gameid = m_gameid;
// WiiWare are identified by their first four characters
if (m_gameid[0] == 'W')
switch (m_gameid[0])
{
case 'R':
case 'S':
case 'G':
break;
default:
// All channels (WiiWare, VirtualConsole, etc) are identified by their first four characters
gameid = m_gameid.substr(0, 4);
break;
}
sf::Http::Request req;
req.SetURI("/txt.php?txt=" + gameid);