mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Trying to get gui to compile with wx 2.9
Shouldn't affect normal compile. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4362 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -304,7 +304,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
|
|||||||
_T("Apply signature file"), wxEmptyString, wxEmptyString, wxEmptyString,
|
_T("Apply signature file"), wxEmptyString, wxEmptyString, wxEmptyString,
|
||||||
_T("Dolphin Symbole Rename File (*.sym)|*.sym;"), wxFD_OPEN | wxFD_FILE_MUST_EXIST,
|
_T("Dolphin Symbole Rename File (*.sym)|*.sym;"), wxFD_OPEN | wxFD_FILE_MUST_EXIST,
|
||||||
this);
|
this);
|
||||||
if (path)
|
if (! path.IsEmpty())
|
||||||
{
|
{
|
||||||
FILE *f = fopen(path.mb_str(), "r");
|
FILE *f = fopen(path.mb_str(), "r");
|
||||||
if (!f)
|
if (!f)
|
||||||
@ -342,7 +342,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
|
|||||||
_T("Save signature as"), wxEmptyString, wxEmptyString, wxEmptyString,
|
_T("Save signature as"), wxEmptyString, wxEmptyString, wxEmptyString,
|
||||||
_T("Dolphin Signature File (*.dsy)|*.dsy;"), wxFD_SAVE,
|
_T("Dolphin Signature File (*.dsy)|*.dsy;"), wxFD_SAVE,
|
||||||
this);
|
this);
|
||||||
if (path) {
|
if (! path.IsEmpty()) {
|
||||||
SignatureDB db;
|
SignatureDB db;
|
||||||
db.Initialize(&g_symbolDB, prefix.c_str());
|
db.Initialize(&g_symbolDB, prefix.c_str());
|
||||||
std::string filename(path.mb_str()); // PPCAnalyst::SaveSignatureDB(
|
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("Apply signature file"), wxEmptyString, wxEmptyString, wxEmptyString,
|
||||||
_T("Dolphin Signature File (*.dsy)|*.dsy;"), wxFD_OPEN | wxFD_FILE_MUST_EXIST,
|
_T("Dolphin Signature File (*.dsy)|*.dsy;"), wxFD_OPEN | wxFD_FILE_MUST_EXIST,
|
||||||
this);
|
this);
|
||||||
if (path) {
|
if (! path.IsEmpty()) {
|
||||||
SignatureDB db;
|
SignatureDB db;
|
||||||
db.Load(path.mb_str());
|
db.Load(path.mb_str());
|
||||||
db.Apply(&g_symbolDB);
|
db.Apply(&g_symbolDB);
|
||||||
|
@ -803,7 +803,7 @@ void CFrame::OnLoadStateFromFile(wxCommandEvent& WXUNUSED (event))
|
|||||||
wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
|
wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
|
||||||
this);
|
this);
|
||||||
|
|
||||||
if(path)
|
if(!path.IsEmpty())
|
||||||
State_LoadAs((const char*)path.mb_str());
|
State_LoadAs((const char*)path.mb_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -821,7 +821,7 @@ void CFrame::OnSaveStateToFile(wxCommandEvent& WXUNUSED (event))
|
|||||||
wxFD_SAVE,
|
wxFD_SAVE,
|
||||||
this);
|
this);
|
||||||
|
|
||||||
if(path)
|
if(! path.IsEmpty())
|
||||||
State_SaveAs((const char*)path.mb_str());
|
State_SaveAs((const char*)path.mb_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -671,9 +671,9 @@ void CISOProperties::ExportDir(const char* _rFullPath, const char* _rExportFolde
|
|||||||
// Extraction
|
// Extraction
|
||||||
for (u32 i = index[0]; i < index[1]; i++)
|
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)));
|
(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;
|
break;
|
||||||
|
|
||||||
if (fst[i]->IsDirectory())
|
if (fst[i]->IsDirectory())
|
||||||
|
@ -201,43 +201,82 @@ bool DolphinApp::OnInit()
|
|||||||
|
|
||||||
// Parse command lines
|
// Parse command lines
|
||||||
#if wxUSE_CMDLINE_PARSER
|
#if wxUSE_CMDLINE_PARSER
|
||||||
|
#if wxCHECK_VERSION(2, 9, 0)
|
||||||
wxCmdLineEntryDesc cmdLineDesc[] =
|
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_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_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_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_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_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_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
wxCMD_LINE_NONE
|
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__)
|
#if defined(__APPLE__)
|
||||||
// check to see if ~/Library/Application Support/Dolphin exists; if not, create it
|
// check to see if ~/Library/Application Support/Dolphin exists; if not, create it
|
||||||
char AppSupportDir[MAXPATHLEN];
|
char AppSupportDir[MAXPATHLEN];
|
||||||
@ -288,19 +327,29 @@ bool DolphinApp::OnInit()
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#if wxCHECK_VERSION(2, 9, 0)
|
||||||
UseDebugger = parser.Found(_T("debugger"));
|
UseDebugger = parser.Found("debugger");
|
||||||
UseLogger = parser.Found(_T("logger"));
|
UseLogger = parser.Found("logger");
|
||||||
LoadElf = parser.Found(_T("elf"), &ElfFile);
|
LoadElf = parser.Found("elf", &ElfFile);
|
||||||
|
#else
|
||||||
|
UseDebugger = parser.Found(_("debugger"));
|
||||||
|
UseLogger = parser.Found(_("logger"));
|
||||||
|
LoadElf = parser.Found(_("elf"), &ElfFile);
|
||||||
|
#endif
|
||||||
if( LoadElf && ElfFile == wxEmptyString )
|
if( LoadElf && ElfFile == wxEmptyString )
|
||||||
PanicAlert("You did not specify a file name");
|
PanicAlert("You did not specify a file name");
|
||||||
|
|
||||||
selectVideoPlugin = parser.Found(_T("video_plugin"), &videoPluginFilename);
|
#if wxCHECK_VERSION(2, 9, 0)
|
||||||
selectAudioPlugin = parser.Found(_T("audio_plugin"), &audioPluginFilename);
|
selectVideoPlugin = parser.Found("video_plugin", &videoPluginFilename);
|
||||||
selectPadPlugin = parser.Found(_T("pad_plugin"), &padPluginFilename);
|
selectAudioPlugin = parser.Found("audio_plugin", &audioPluginFilename);
|
||||||
selectWiimotePlugin = parser.Found(_T("wiimote_plugin"), &wiimotePluginFilename);
|
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
|
#endif
|
||||||
|
|
||||||
@ -615,4 +664,4 @@ void Host_SetWiiMoteConnectionState(int _State)
|
|||||||
|
|
||||||
wxPostEvent(main_frame, event);
|
wxPostEvent(main_frame, event);
|
||||||
}
|
}
|
||||||
#endif // HAVE_WX
|
#endif // HAVE_WX
|
||||||
|
@ -41,8 +41,9 @@ void NetEvent::SendEvent(int EventType, const std::string text, int integer)
|
|||||||
event.SetId( EventType );
|
event.SetId( EventType );
|
||||||
event.SetInt( integer );
|
event.SetInt( integer );
|
||||||
event.SetString( wxString::FromAscii(text.c_str()) );
|
event.SetString( wxString::FromAscii(text.c_str()) );
|
||||||
|
#if ! wxCHECK_VERSION(2, 9, 0)
|
||||||
m_netptr->AddPendingEvent(event);
|
m_netptr->AddPendingEvent(event);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------
|
//--------------------------------
|
||||||
|
@ -93,7 +93,7 @@ bool CopySJISToString(wxString& _rDestination, const char* _src)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
_rDestination = wxString(wxString(_src,wxConvLibc),wxConvUTF8);
|
_rDestination = wxString(_src,wxConvUTF8);
|
||||||
returnCode = true;
|
returnCode = true;
|
||||||
#endif
|
#endif
|
||||||
return returnCode;
|
return returnCode;
|
||||||
|
@ -281,12 +281,12 @@ void WiimotePadConfigDialog::ToBlank(bool _ToBlank)
|
|||||||
if(_ToBlank)
|
if(_ToBlank)
|
||||||
{
|
{
|
||||||
for(int i = IDB_ANALOG_LEFT_X; i <= IDB_TRIGGER_R; i++)
|
for(int i = IDB_ANALOG_LEFT_X; i <= IDB_TRIGGER_R; i++)
|
||||||
#ifndef _WIN32
|
#if ! defined _WIN32 && ! wxCHECK_VERSION(2, 9, 0)
|
||||||
if(GetButtonText(i, j).ToAscii() == "-1")
|
if(GetButtonText(i, j).ToAscii() == "-1")
|
||||||
SetButtonText(i, (char *)"", j);
|
SetButtonText(i, (char *)"", j);
|
||||||
#else
|
#else
|
||||||
if(GetButtonText(i, j) == wxT("-1")) SetButtonText(i, "", j);
|
if(GetButtonText(i, j) == wxT("-1")) SetButtonText(i, "", j);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user