Correctly use _T() to convert const char * to wxString
instead of a simple cast.
This commit is contained in:
parent
13283cdf8f
commit
83aad21779
|
@ -43,7 +43,7 @@ public:
|
||||||
{
|
{
|
||||||
wxMessageBox(wxString::Format
|
wxMessageBox(wxString::Format
|
||||||
(
|
(
|
||||||
"Desmume on %s",
|
_T("Desmume on %s"),
|
||||||
wxGetOsDescription()
|
wxGetOsDescription()
|
||||||
),
|
),
|
||||||
"About Desmume",
|
"About Desmume",
|
||||||
|
@ -114,7 +114,7 @@ public:
|
||||||
|
|
||||||
//TODO integrate paths system?
|
//TODO integrate paths system?
|
||||||
void LoadRom(wxCommandEvent& event){
|
void LoadRom(wxCommandEvent& event){
|
||||||
wxFileDialog dialog(this,(wxChar *)"Load Rom",wxGetHomeDir(),(wxChar *)"",(wxChar *)"*.nds",wxFD_OPEN, wxDefaultPosition, wxDefaultSize);
|
wxFileDialog dialog(this,_T("Load Rom"),wxGetHomeDir(),_T(""),_T("*.nds"),wxFD_OPEN, wxDefaultPosition, wxDefaultSize);
|
||||||
if(dialog.ShowModal() == wxID_OK) {
|
if(dialog.ShowModal() == wxID_OK) {
|
||||||
NDS_Init ();
|
NDS_Init ();
|
||||||
execute = true;
|
execute = true;
|
||||||
|
@ -214,9 +214,9 @@ public:
|
||||||
void subBG2(wxCommandEvent& event){subG(2);}
|
void subBG2(wxCommandEvent& event){subG(2);}
|
||||||
void subBG3(wxCommandEvent& event){subG(3);}
|
void subBG3(wxCommandEvent& event){subG(3);}
|
||||||
|
|
||||||
void website(wxCommandEvent& event) {wxLaunchDefaultBrowser((wxChar *)"http://desmume.org/");}
|
void website(wxCommandEvent& event) {wxLaunchDefaultBrowser(_T("http://desmume.org/"));}
|
||||||
void forums(wxCommandEvent& event) {wxLaunchDefaultBrowser((wxChar *)"http://forums.desmume.org/index.php");}
|
void forums(wxCommandEvent& event) {wxLaunchDefaultBrowser(_T("http://forums.desmume.org/index.php"));}
|
||||||
void submitABugReport(wxCommandEvent& event) {wxLaunchDefaultBrowser((wxChar *)"http://sourceforge.net/tracker/?func=add&group_id=164579&atid=832291");}
|
void submitABugReport(wxCommandEvent& event) {wxLaunchDefaultBrowser(_T("http://sourceforge.net/tracker/?func=add&group_id=164579&atid=832291"));}
|
||||||
|
|
||||||
void _3dView(wxCommandEvent& event) {
|
void _3dView(wxCommandEvent& event) {
|
||||||
driver->VIEW3D_Init();
|
driver->VIEW3D_Init();
|
||||||
|
@ -224,12 +224,12 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void saveStateAs(wxCommandEvent& event) {
|
void saveStateAs(wxCommandEvent& event) {
|
||||||
wxFileDialog dialog(this,(wxChar *)"Save State As",wxGetHomeDir(),(wxChar *)"",(wxChar *)"*.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());
|
||||||
}
|
}
|
||||||
void loadStateFrom(wxCommandEvent& event) {
|
void loadStateFrom(wxCommandEvent& event) {
|
||||||
wxFileDialog dialog(this,(wxChar *)"Load State From",wxGetHomeDir(),(wxChar *)"",(wxChar *)"*.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());
|
||||||
}
|
}
|
||||||
|
@ -242,20 +242,20 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void importBackupMemory(wxCommandEvent& event) {
|
void importBackupMemory(wxCommandEvent& event) {
|
||||||
wxFileDialog dialog(this,(wxChar *)"Import Backup Memory",wxGetHomeDir(),(wxChar *)"",(wxChar *)"*.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()))
|
||||||
wxMessageBox(wxString::Format((wxChar *)"Save was not successfully imported"),(wxChar *)"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,(wxChar *)"Export Backup Memory",wxGetHomeDir(),(wxChar *)"",(wxChar *)"*.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()))
|
||||||
wxMessageBox(wxString::Format((wxChar *)"Save was not successfully exported"),(wxChar *)"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,(wxChar *)"Save Screenshot As",wxGetHomeDir(),(wxChar *)"",(wxChar *)"*.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());
|
||||||
}
|
}
|
||||||
|
@ -284,7 +284,7 @@ public:
|
||||||
|
|
||||||
for (int i = 0; i < 10; i++)
|
for (int i = 0; i < 10; i++)
|
||||||
{
|
{
|
||||||
mnuSubstates->Append( baseid+i+1, wxString::Format((wxChar *)"Slot %d", i) );
|
mnuSubstates->Append( baseid+i+1, wxString::Format(_T("Slot %d"), i) );
|
||||||
}
|
}
|
||||||
return mnuSubstates;
|
return mnuSubstates;
|
||||||
}
|
}
|
||||||
|
@ -410,7 +410,7 @@ bool Desmume::OnInit()
|
||||||
OpenConsole();
|
OpenConsole();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DesmumeFrame *frame = new DesmumeFrame((wxChar *)EMU_DESMUME_NAME_AND_VERSION());
|
DesmumeFrame *frame = new DesmumeFrame(_T(EMU_DESMUME_NAME_AND_VERSION()));
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
|
|
||||||
char *p, *a;
|
char *p, *a;
|
||||||
|
@ -446,16 +446,16 @@ DesmumeFrame::DesmumeFrame(const wxString& title)
|
||||||
wxMenu *toolsMenu = new wxMenu;
|
wxMenu *toolsMenu = new wxMenu;
|
||||||
wxMenu *helpMenu = new wxMenu;
|
wxMenu *helpMenu = new wxMenu;
|
||||||
|
|
||||||
fileMenu->Append(wRom, (wxChar *)"Load R&om\tAlt-R");
|
fileMenu->Append(wRom, _T("Load R&om\tAlt-R"));
|
||||||
fileMenu->Append(wCloseRom, (wxChar *)"Close Rom");
|
fileMenu->Append(wCloseRom, _T("Close Rom"));
|
||||||
fileMenu->AppendSeparator();
|
fileMenu->AppendSeparator();
|
||||||
fileMenu->Append(wSaveStateAs, (wxChar *)"Save State As...");
|
fileMenu->Append(wSaveStateAs, _T("Save State As..."));
|
||||||
fileMenu->Append(wLoadStateFrom, (wxChar *)"Load State From...");
|
fileMenu->Append(wLoadStateFrom, _T("Load State From..."));
|
||||||
{
|
{
|
||||||
wxMenu* saves(DesmumeFrame::MakeStatesSubMenu(wSaveState01));
|
wxMenu* saves(DesmumeFrame::MakeStatesSubMenu(wSaveState01));
|
||||||
wxMenu* loads(DesmumeFrame::MakeStatesSubMenu(wLoadState01));
|
wxMenu* loads(DesmumeFrame::MakeStatesSubMenu(wLoadState01));
|
||||||
fileMenu->AppendSubMenu(saves, (wxChar *)"Save State");
|
fileMenu->AppendSubMenu(saves, _T("Save State"));
|
||||||
fileMenu->AppendSubMenu(loads, (wxChar *)"Load State");
|
fileMenu->AppendSubMenu(loads, _T("Load State"));
|
||||||
#define ConnectMenuRange( id_start, inc, handler ) \
|
#define ConnectMenuRange( id_start, inc, handler ) \
|
||||||
Connect( id_start, id_start + inc, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(DesmumeFrame::handler) )
|
Connect( id_start, id_start + inc, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(DesmumeFrame::handler) )
|
||||||
//TODO something is wrong here
|
//TODO something is wrong here
|
||||||
|
@ -463,64 +463,64 @@ DesmumeFrame::DesmumeFrame(const wxString& title)
|
||||||
// ConnectMenuRange(wSaveState01+1, 10, Menu_SaveStates);
|
// ConnectMenuRange(wSaveState01+1, 10, Menu_SaveStates);
|
||||||
}
|
}
|
||||||
fileMenu->AppendSeparator();
|
fileMenu->AppendSeparator();
|
||||||
fileMenu->Append(wImportBackupMemory, (wxChar *)"Import Backup Memory...");
|
fileMenu->Append(wImportBackupMemory, _T("Import Backup Memory..."));
|
||||||
fileMenu->Append(wExportBackupMemory, (wxChar *)"Export Backup Memory...");
|
fileMenu->Append(wExportBackupMemory, _T("Export Backup Memory..."));
|
||||||
fileMenu->AppendSeparator();
|
fileMenu->AppendSeparator();
|
||||||
fileMenu->Append(wSaveScreenshotAs, (wxChar *)"Save Screenshot As");
|
fileMenu->Append(wSaveScreenshotAs, _T("Save Screenshot As"));
|
||||||
fileMenu->Append(wQuickScreenshot, (wxChar *)"Quick Screenshot");
|
fileMenu->Append(wQuickScreenshot, _T("Quick Screenshot"));
|
||||||
fileMenu->AppendSeparator();
|
fileMenu->AppendSeparator();
|
||||||
fileMenu->Append(wPlayMovie, (wxChar *)"Play Movie");
|
fileMenu->Append(wPlayMovie, _T("Play Movie"));
|
||||||
fileMenu->Append(wRecordMovie, (wxChar *)"Record Movie");
|
fileMenu->Append(wRecordMovie, _T("Record Movie"));
|
||||||
fileMenu->Append(wStopMovie, (wxChar *)"Stop Movie");
|
fileMenu->Append(wStopMovie, _T("Stop Movie"));
|
||||||
fileMenu->AppendSeparator();
|
fileMenu->AppendSeparator();
|
||||||
fileMenu->Append(wLuaWindow, (wxChar *)"New Lua Script Window...");
|
fileMenu->Append(wLuaWindow, _T("New Lua Script Window..."));
|
||||||
fileMenu->AppendSeparator();
|
fileMenu->AppendSeparator();
|
||||||
fileMenu->Append(wExit, (wxChar *)"E&xit\tAlt-X", (wxChar *)"Quit this program");
|
fileMenu->Append(wExit, _T("E&xit\tAlt-X"), _T("Quit this program"));
|
||||||
|
|
||||||
emulationMenu->Append(wPause, (wxChar *)"&Pause\tAlt-P", (wxChar *)"Pause Emulation");
|
emulationMenu->Append(wPause, _T("&Pause\tAlt-P"), _T("Pause Emulation"));
|
||||||
emulationMenu->Append(wReset, (wxChar *)"&Reset\tAlt-R", (wxChar *)"Reset Emulation");
|
emulationMenu->Append(wReset, _T("&Reset\tAlt-R"), _T("Reset Emulation"));
|
||||||
|
|
||||||
viewMenu->AppendSeparator();
|
viewMenu->AppendSeparator();
|
||||||
viewMenu->Append(wFrameCounter, (wxChar *)"&Display Frame Counter");
|
viewMenu->Append(wFrameCounter, _T("&Display Frame Counter"));
|
||||||
viewMenu->Append(wFPS, (wxChar *)"&Display FPS");
|
viewMenu->Append(wFPS, _T("&Display FPS"));
|
||||||
viewMenu->Append(wDisplayInput, (wxChar *)"&Display Input");
|
viewMenu->Append(wDisplayInput, _T("&Display Input"));
|
||||||
viewMenu->Append(wDisplayGraphicalInput, (wxChar *)"&Display Graphical Input");
|
viewMenu->Append(wDisplayGraphicalInput, _T("&Display Graphical Input"));
|
||||||
viewMenu->Append(wDisplayLagCounter, (wxChar *)"&Display Lag Counter");
|
viewMenu->Append(wDisplayLagCounter, _T("&Display Lag Counter"));
|
||||||
viewMenu->Append(wDisplayMicrophone, (wxChar *)"&Display Microphone");
|
viewMenu->Append(wDisplayMicrophone, _T("&Display Microphone"));
|
||||||
|
|
||||||
toolsMenu->Append(w3dView, (wxChar *)"&3d Viewer");
|
toolsMenu->Append(w3dView, _T("&3d Viewer"));
|
||||||
wxMenu *layersMenu = new wxMenu;
|
wxMenu *layersMenu = new wxMenu;
|
||||||
{
|
{
|
||||||
layersMenu->AppendCheckItem(wMainGPU, (wxChar *)"Main GPU");
|
layersMenu->AppendCheckItem(wMainGPU, _T("Main GPU"));
|
||||||
layersMenu->Append(wMainBG0, (wxChar *)"Main BG 0");
|
layersMenu->Append(wMainBG0, _T("Main BG 0"));
|
||||||
layersMenu->Append(wMainBG1, (wxChar *)"Main BG 1");
|
layersMenu->Append(wMainBG1, _T("Main BG 1"));
|
||||||
layersMenu->Append(wMainBG2, (wxChar *)"Main BG 2");
|
layersMenu->Append(wMainBG2, _T("Main BG 2"));
|
||||||
layersMenu->Append(wMainBG3, (wxChar *)"Main BG 3");
|
layersMenu->Append(wMainBG3, _T("Main BG 3"));
|
||||||
layersMenu->AppendSeparator();
|
layersMenu->AppendSeparator();
|
||||||
layersMenu->Append(wSubGPU, (wxChar *)"Sub GPU");
|
layersMenu->Append(wSubGPU, _T("Sub GPU"));
|
||||||
layersMenu->Append(wSubBG0, (wxChar *)"Sub BG 0");
|
layersMenu->Append(wSubBG0, _T("Sub BG 0"));
|
||||||
layersMenu->Append(wSubBG1, (wxChar *)"Sub BG 1");
|
layersMenu->Append(wSubBG1, _T("Sub BG 1"));
|
||||||
layersMenu->Append(wSubBG2, (wxChar *)"Sub BG 2");
|
layersMenu->Append(wSubBG2, _T("Sub BG 2"));
|
||||||
layersMenu->Append(wSubBG3, (wxChar *)"Sub BG 3");
|
layersMenu->Append(wSubBG3, _T("Sub BG 3"));
|
||||||
}
|
}
|
||||||
|
|
||||||
configMenu->Append(wConfigureControls, (wxChar *)"Controls");
|
configMenu->Append(wConfigureControls, _T("Controls"));
|
||||||
|
|
||||||
toolsMenu->AppendSeparator();
|
toolsMenu->AppendSeparator();
|
||||||
toolsMenu->AppendSubMenu(layersMenu, (wxChar *)"View Layers");
|
toolsMenu->AppendSubMenu(layersMenu, _T("View Layers"));
|
||||||
|
|
||||||
helpMenu->Append(wWebsite, (wxChar *)"&Website");
|
helpMenu->Append(wWebsite, _T("&Website"));
|
||||||
helpMenu->Append(wForums, (wxChar *)"&Forums");
|
helpMenu->Append(wForums, _T("&Forums"));
|
||||||
helpMenu->Append(wSubmitABugReport, (wxChar *)"&Submit A Bug Report");
|
helpMenu->Append(wSubmitABugReport, _T("&Submit A Bug Report"));
|
||||||
helpMenu->Append(wAbout, (wxChar *)"&About", (wxChar *)"Show about dialog");
|
helpMenu->Append(wAbout, _T("&About"), _T("Show about dialog"));
|
||||||
|
|
||||||
wxMenuBar *menuBar = new wxMenuBar();
|
wxMenuBar *menuBar = new wxMenuBar();
|
||||||
menuBar->Append(fileMenu, (wxChar *)"&File");
|
menuBar->Append(fileMenu, _T("&File"));
|
||||||
menuBar->Append(emulationMenu, (wxChar *)"&Emulation");
|
menuBar->Append(emulationMenu, _T("&Emulation"));
|
||||||
menuBar->Append(viewMenu, (wxChar *)"&View");
|
menuBar->Append(viewMenu, _T("&View"));
|
||||||
menuBar->Append(configMenu, (wxChar *)"&Config");
|
menuBar->Append(configMenu, _T("&Config"));
|
||||||
menuBar->Append(toolsMenu, (wxChar *)"&Tools");
|
menuBar->Append(toolsMenu, _T("&Tools"));
|
||||||
menuBar->Append(helpMenu, (wxChar *)"&Help");
|
menuBar->Append(helpMenu, _T("&Help"));
|
||||||
SetMenuBar(menuBar);
|
SetMenuBar(menuBar);
|
||||||
|
|
||||||
// CreateStatusBar(2);
|
// CreateStatusBar(2);
|
||||||
|
|
Loading…
Reference in New Issue