More string fixup.
This commit is contained in:
parent
83aad21779
commit
1743b0b81b
|
@ -41,12 +41,9 @@ public:
|
||||||
void OnQuit(wxCommandEvent& WXUNUSED(event)){Close(true);}
|
void OnQuit(wxCommandEvent& WXUNUSED(event)){Close(true);}
|
||||||
void OnAbout(wxCommandEvent& WXUNUSED(event))
|
void OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxMessageBox(wxString::Format
|
wxString desmume_on(_T("Desmume on %s"), wxGetOsDescription());
|
||||||
(
|
wxMessageBox(desmume_on,
|
||||||
_T("Desmume on %s"),
|
_T("About Desmume"),
|
||||||
wxGetOsDescription()
|
|
||||||
),
|
|
||||||
"About Desmume",
|
|
||||||
wxOK | wxICON_INFORMATION,
|
wxOK | wxICON_INFORMATION,
|
||||||
this);
|
this);
|
||||||
}
|
}
|
||||||
|
@ -118,7 +115,7 @@ public:
|
||||||
if(dialog.ShowModal() == wxID_OK) {
|
if(dialog.ShowModal() == wxID_OK) {
|
||||||
NDS_Init ();
|
NDS_Init ();
|
||||||
execute = true;
|
execute = true;
|
||||||
NDS_LoadROM(dialog.GetPath(), dialog.GetPath());
|
NDS_LoadROM(dialog.GetPath().mb_str(), dialog.GetPath().mb_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,12 +223,12 @@ public:
|
||||||
void saveStateAs(wxCommandEvent& event) {
|
void saveStateAs(wxCommandEvent& event) {
|
||||||
wxFileDialog dialog(this,_T("Save State As"),wxGetHomeDir(),_T(""),_T("*.dst"),wxFD_SAVE, wxDefaultPosition, wxDefaultSize);
|
wxFileDialog dialog(this,_T("Save State As"),wxGetHomeDir(),_T(""),_T("*.dst"),wxFD_SAVE, wxDefaultPosition, wxDefaultSize);
|
||||||
if(dialog.ShowModal() == wxID_OK)
|
if(dialog.ShowModal() == wxID_OK)
|
||||||
savestate_save (dialog.GetPath());
|
savestate_save (dialog.GetPath().mb_str());
|
||||||
}
|
}
|
||||||
void loadStateFrom(wxCommandEvent& event) {
|
void loadStateFrom(wxCommandEvent& event) {
|
||||||
wxFileDialog dialog(this,_T("Load State From"),wxGetHomeDir(),_T(""),_T("*.dst"),wxFD_OPEN, wxDefaultPosition, wxDefaultSize);
|
wxFileDialog dialog(this,_T("Load State From"),wxGetHomeDir(),_T(""),_T("*.dst"),wxFD_OPEN, wxDefaultPosition, wxDefaultSize);
|
||||||
if(dialog.ShowModal() == wxID_OK)
|
if(dialog.ShowModal() == wxID_OK)
|
||||||
savestate_load (dialog.GetPath());
|
savestate_load (dialog.GetPath().mb_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void closeRom(wxCommandEvent& event) {
|
void closeRom(wxCommandEvent& event) {
|
||||||
|
@ -244,23 +241,23 @@ public:
|
||||||
void importBackupMemory(wxCommandEvent& event) {
|
void importBackupMemory(wxCommandEvent& event) {
|
||||||
wxFileDialog dialog(this,_T("Import Backup Memory"),wxGetHomeDir(),_T(""),_T("*.duc, *.sav"),wxFD_OPEN, wxDefaultPosition, wxDefaultSize);
|
wxFileDialog dialog(this,_T("Import Backup Memory"),wxGetHomeDir(),_T(""),_T("*.duc, *.sav"),wxFD_OPEN, wxDefaultPosition, wxDefaultSize);
|
||||||
if(dialog.ShowModal() == wxID_OK)
|
if(dialog.ShowModal() == wxID_OK)
|
||||||
if (!NDS_ImportSave(dialog.GetPath()))
|
if (!NDS_ImportSave(dialog.GetPath().mb_str()))
|
||||||
wxMessageBox(wxString::Format(_T("Save was not successfully imported")),_T("Error"),wxOK | wxICON_ERROR,this);
|
wxMessageBox(wxString::Format(_T("Save was not successfully imported")),_T("Error"),wxOK | wxICON_ERROR,this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void exportBackupMemory(wxCommandEvent& event) {
|
void exportBackupMemory(wxCommandEvent& event) {
|
||||||
wxFileDialog dialog(this,_T("Export Backup Memory"),wxGetHomeDir(),_T(""),_T("*.duc, *.sav"),wxFD_SAVE, wxDefaultPosition, wxDefaultSize);
|
wxFileDialog dialog(this,_T("Export Backup Memory"),wxGetHomeDir(),_T(""),_T("*.duc, *.sav"),wxFD_SAVE, wxDefaultPosition, wxDefaultSize);
|
||||||
if(dialog.ShowModal() == wxID_OK)
|
if(dialog.ShowModal() == wxID_OK)
|
||||||
if (!NDS_ExportSave(dialog.GetPath()))
|
if (!NDS_ExportSave(dialog.GetPath().mb_str()))
|
||||||
wxMessageBox(wxString::Format(_T("Save was not successfully exported")),_T("Error"),wxOK | wxICON_ERROR,this);
|
wxMessageBox(wxString::Format(_T("Save was not successfully exported")),_T("Error"),wxOK | wxICON_ERROR,this);
|
||||||
}
|
}
|
||||||
void saveScreenshotAs(wxCommandEvent& event) {
|
void saveScreenshotAs(wxCommandEvent& event) {
|
||||||
wxFileDialog dialog(this,_T("Save Screenshot As"),wxGetHomeDir(),_T(""),_T("*.png"),wxFD_SAVE, wxDefaultPosition, wxDefaultSize);
|
wxFileDialog dialog(this,_T("Save Screenshot As"),wxGetHomeDir(),_T(""),_T("*.png"),wxFD_SAVE, wxDefaultPosition, wxDefaultSize);
|
||||||
if(dialog.ShowModal() == wxID_OK)
|
if(dialog.ShowModal() == wxID_OK)
|
||||||
NDS_WritePNG(dialog.GetPath());
|
NDS_WritePNG(dialog.GetPath().mb_str());
|
||||||
}
|
}
|
||||||
void quickScreenshot(wxCommandEvent& event) {
|
void quickScreenshot(wxCommandEvent& event) {
|
||||||
NDS_WritePNG(wxStandardPaths::Get().GetExecutablePath());//TODO GetExecutablePath is wrong
|
NDS_WritePNG(wxStandardPaths::Get().GetExecutablePath().mb_str());//TODO GetExecutablePath is wrong
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO
|
//TODO
|
||||||
|
@ -410,11 +407,12 @@ bool Desmume::OnInit()
|
||||||
OpenConsole();
|
OpenConsole();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DesmumeFrame *frame = new DesmumeFrame(_T(EMU_DESMUME_NAME_AND_VERSION()));
|
wxString emu_version(EMU_DESMUME_NAME_AND_VERSION(), wxConvUTF8);
|
||||||
|
DesmumeFrame *frame = new DesmumeFrame(emu_version);
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
|
|
||||||
char *p, *a;
|
char *p, *a;
|
||||||
std::string b = wxStandardPaths::Get().GetExecutablePath();
|
std::string b = std::string(wxStandardPaths::Get().GetExecutablePath().mb_str());
|
||||||
a = const_cast<char*>(b.c_str());
|
a = const_cast<char*>(b.c_str());
|
||||||
p = a + lstrlen(a);
|
p = a + lstrlen(a);
|
||||||
while (p >= a && *p != '\\') p--;
|
while (p >= a && *p != '\\') p--;
|
||||||
|
|
Loading…
Reference in New Issue