diff --git a/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp b/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp index 78b5ca1f52..474d62a179 100644 --- a/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp +++ b/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp @@ -304,7 +304,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event) _T("Apply signature file"), wxEmptyString, wxEmptyString, wxEmptyString, _T("Dolphin Symbole Rename File (*.sym)|*.sym;"), wxFD_OPEN | wxFD_FILE_MUST_EXIST, this); - if (path) + if (! path.IsEmpty()) { FILE *f = fopen(path.mb_str(), "r"); if (!f) @@ -342,7 +342,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event) _T("Save signature as"), wxEmptyString, wxEmptyString, wxEmptyString, _T("Dolphin Signature File (*.dsy)|*.dsy;"), wxFD_SAVE, this); - if (path) { + if (! path.IsEmpty()) { SignatureDB db; db.Initialize(&g_symbolDB, prefix.c_str()); std::string filename(path.mb_str()); // PPCAnalyst::SaveSignatureDB( @@ -357,7 +357,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event) _T("Apply signature file"), wxEmptyString, wxEmptyString, wxEmptyString, _T("Dolphin Signature File (*.dsy)|*.dsy;"), wxFD_OPEN | wxFD_FILE_MUST_EXIST, this); - if (path) { + if (! path.IsEmpty()) { SignatureDB db; db.Load(path.mb_str()); db.Apply(&g_symbolDB); diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp index eb7fcb17d7..c3bda8e3de 100644 --- a/Source/Core/DolphinWX/Src/FrameTools.cpp +++ b/Source/Core/DolphinWX/Src/FrameTools.cpp @@ -803,7 +803,7 @@ void CFrame::OnLoadStateFromFile(wxCommandEvent& WXUNUSED (event)) wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST, this); - if(path) + if(!path.IsEmpty()) State_LoadAs((const char*)path.mb_str()); } @@ -821,7 +821,7 @@ void CFrame::OnSaveStateToFile(wxCommandEvent& WXUNUSED (event)) wxFD_SAVE, this); - if(path) + if(! path.IsEmpty()) State_SaveAs((const char*)path.mb_str()); } diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp index 4d0bac59da..aa42012a9f 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.cpp +++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp @@ -671,9 +671,9 @@ void CISOProperties::ExportDir(const char* _rFullPath, const char* _rExportFolde // Extraction for (u32 i = index[0]; i < index[1]; i++) { - dialog.SetTitle(wxString::Format(_T("%s : %d%%"), dialogTitle, + dialog.SetTitle(wxString::Format(_T("%s : %d%%"), (const char *)dialogTitle.mb_str(), (u32)(((float)(i - index[0]) / (float)(index[1] - index[0])) * 100))); - if (!dialog.Update(i, wxString::Format(_T("Extracting %s"), wxString::FromAscii(fst[i]->m_FullPath)))) + if (!dialog.Update(i, wxString::Format(_T("Extracting %s"), fst[i]->m_FullPath))) break; if (fst[i]->IsDirectory()) diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp index d92f3842e7..b5a27c09ca 100644 --- a/Source/Core/DolphinWX/Src/Main.cpp +++ b/Source/Core/DolphinWX/Src/Main.cpp @@ -201,43 +201,82 @@ bool DolphinApp::OnInit() // Parse command lines #if wxUSE_CMDLINE_PARSER +#if wxCHECK_VERSION(2, 9, 0) wxCmdLineEntryDesc cmdLineDesc[] = { { - wxCMD_LINE_SWITCH, _T("h"), _T("help"), _T("Show this help message"), + wxCMD_LINE_SWITCH, "h", "help", "Show this help message", wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP }, { - wxCMD_LINE_SWITCH, _T("d"), _T("debugger"), _T("Opens the debugger") + wxCMD_LINE_SWITCH, "d", "debugger", "Opens the debugger" }, { - wxCMD_LINE_SWITCH, _T("l"), _T("logger"), _T("Opens The Logger") + wxCMD_LINE_SWITCH, "l", "logger", "Opens The Logger" }, { - wxCMD_LINE_OPTION, _T("e"), _T("elf"), _T("Loads an elf file"), + wxCMD_LINE_OPTION, "e", "elf", "Loads an elf file", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, { - wxCMD_LINE_OPTION, _T("V"), _T("video_plugin"),_T("Specify a video plugin"), + wxCMD_LINE_OPTION, "V", "video_plugin","Specify a video plugin", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, { - wxCMD_LINE_OPTION, _T("A"), _T("audio_plugin"),_T("Specify an audio plugin"), + wxCMD_LINE_OPTION, "A", "audio_plugin","Specify an audio plugin", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, { - wxCMD_LINE_OPTION, _T("P"), _T("pad_plugin"),_T("Specify a pad plugin"), + wxCMD_LINE_OPTION, "P", "pad_plugin","Specify a pad plugin", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, { - wxCMD_LINE_OPTION, _T("W"), _T("wiimote_plugin"),_T("Specify a wiimote plugin"), + wxCMD_LINE_OPTION, "W", "wiimote_plugin","Specify a wiimote plugin", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, { wxCMD_LINE_NONE } }; - +#else + wxCmdLineEntryDesc cmdLineDesc[] = + { + { + wxCMD_LINE_SWITCH, _("h"), _("help"), + wxT("Show this help message"), + wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP + }, + { + wxCMD_LINE_SWITCH, _("d"), _("debugger"), wxT("Opens the debugger") + }, + { + wxCMD_LINE_SWITCH, _("l"), _("logger"), wxT("Opens The Logger") + }, + { + wxCMD_LINE_OPTION, _("e"), _("elf"), wxT("Loads an elf file"), + wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL + }, + { + wxCMD_LINE_OPTION, _("V"), _("video_plugin"), wxT("Specify a video plugin"), + wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL + }, + { + wxCMD_LINE_OPTION, _("A"), _("audio_plugin"), wxT("Specify an audio plugin"), + wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL + }, + { + wxCMD_LINE_OPTION, _("P"), _("pad_plugin"), wxT("Specify a pad plugin"), + wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL + }, + { + wxCMD_LINE_OPTION, _("W"), _("wiimote_plugin"), wxT("Specify a wiimote plugin"), + wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL + }, + { + wxCMD_LINE_NONE + } + }; +#endif #if defined(__APPLE__) // check to see if ~/Library/Application Support/Dolphin exists; if not, create it char AppSupportDir[MAXPATHLEN]; @@ -288,19 +327,29 @@ bool DolphinApp::OnInit() { return false; } - - UseDebugger = parser.Found(_T("debugger")); - UseLogger = parser.Found(_T("logger")); - LoadElf = parser.Found(_T("elf"), &ElfFile); - +#if wxCHECK_VERSION(2, 9, 0) + UseDebugger = parser.Found("debugger"); + UseLogger = parser.Found("logger"); + LoadElf = parser.Found("elf", &ElfFile); +#else + UseDebugger = parser.Found(_("debugger")); + UseLogger = parser.Found(_("logger")); + LoadElf = parser.Found(_("elf"), &ElfFile); +#endif if( LoadElf && ElfFile == wxEmptyString ) PanicAlert("You did not specify a file name"); - selectVideoPlugin = parser.Found(_T("video_plugin"), &videoPluginFilename); - selectAudioPlugin = parser.Found(_T("audio_plugin"), &audioPluginFilename); - selectPadPlugin = parser.Found(_T("pad_plugin"), &padPluginFilename); - selectWiimotePlugin = parser.Found(_T("wiimote_plugin"), &wiimotePluginFilename); - +#if wxCHECK_VERSION(2, 9, 0) + selectVideoPlugin = parser.Found("video_plugin", &videoPluginFilename); + selectAudioPlugin = parser.Found("audio_plugin", &audioPluginFilename); + selectPadPlugin = parser.Found("pad_plugin", &padPluginFilename); + selectWiimotePlugin = parser.Found("wiimote_plugin", &wiimotePluginFilename); +#else + selectVideoPlugin = parser.Found("video_plugin", &videoPluginFilename); + selectAudioPlugin = parser.Found("audio_plugin", &audioPluginFilename); + selectPadPlugin = parser.Found("pad_plugin", &padPluginFilename); + selectWiimotePlugin = parser.Found("wiimote_plugin", &wiimotePluginFilename); +#endif // ============ #endif @@ -615,4 +664,4 @@ void Host_SetWiiMoteConnectionState(int _State) wxPostEvent(main_frame, event); } -#endif // HAVE_WX \ No newline at end of file +#endif // HAVE_WX diff --git a/Source/Core/DolphinWX/Src/NetSockets.cpp b/Source/Core/DolphinWX/Src/NetSockets.cpp index 7079c72cb2..03f316e49d 100644 --- a/Source/Core/DolphinWX/Src/NetSockets.cpp +++ b/Source/Core/DolphinWX/Src/NetSockets.cpp @@ -41,8 +41,9 @@ void NetEvent::SendEvent(int EventType, const std::string text, int integer) event.SetId( EventType ); event.SetInt( integer ); event.SetString( wxString::FromAscii(text.c_str()) ); - +#if ! wxCHECK_VERSION(2, 9, 0) m_netptr->AddPendingEvent(event); +#endif } //-------------------------------- diff --git a/Source/Core/DolphinWX/Src/WxUtils.cpp b/Source/Core/DolphinWX/Src/WxUtils.cpp index 34af9c0240..058ba5d049 100644 --- a/Source/Core/DolphinWX/Src/WxUtils.cpp +++ b/Source/Core/DolphinWX/Src/WxUtils.cpp @@ -93,7 +93,7 @@ bool CopySJISToString(wxString& _rDestination, const char* _src) } } #else - _rDestination = wxString(wxString(_src,wxConvLibc),wxConvUTF8); + _rDestination = wxString(_src,wxConvUTF8); returnCode = true; #endif return returnCode; diff --git a/Source/Plugins/Plugin_Wiimote/Src/ConfigGamepad.cpp b/Source/Plugins/Plugin_Wiimote/Src/ConfigGamepad.cpp index ea13702052..5fbd1802f4 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/ConfigGamepad.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/ConfigGamepad.cpp @@ -281,12 +281,12 @@ void WiimotePadConfigDialog::ToBlank(bool _ToBlank) if(_ToBlank) { for(int i = IDB_ANALOG_LEFT_X; i <= IDB_TRIGGER_R; i++) - #ifndef _WIN32 - if(GetButtonText(i, j).ToAscii() == "-1") - SetButtonText(i, (char *)"", j); - #else - if(GetButtonText(i, j) == wxT("-1")) SetButtonText(i, "", j); - #endif +#if ! defined _WIN32 && ! wxCHECK_VERSION(2, 9, 0) + if(GetButtonText(i, j).ToAscii() == "-1") + SetButtonText(i, (char *)"", j); +#else + if(GetButtonText(i, j) == wxT("-1")) SetButtonText(i, "", j); +#endif } else {