From c7795c41b7f44bed9e6c1dbab40edebfe8566ded Mon Sep 17 00:00:00 2001 From: Sonicadvance1 Date: Sun, 20 Jul 2008 11:02:41 +0000 Subject: Linux: Fix ups for people running Linux. If it breaks anything, punch me in the face. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@30 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DebuggerWX/src/BreakpointView.cpp | 15 ++++++++++----- Source/Core/DebuggerWX/src/BreakpointWindow.cpp | 2 +- Source/Core/DebuggerWX/src/CodeView.cpp | 10 +++++----- Source/Core/DebuggerWX/src/CodeWindow.cpp | 4 ++-- Source/Core/DebuggerWX/src/LogWindow.cpp | 6 +++--- Source/Core/DebuggerWX/src/RegisterView.cpp | 4 ++-- Source/Core/DebuggerWX/src/SConscript | 3 +++ 7 files changed, 26 insertions(+), 18 deletions(-) (limited to 'Source/Core/DebuggerWX/src') diff --git a/Source/Core/DebuggerWX/src/BreakpointView.cpp b/Source/Core/DebuggerWX/src/BreakpointView.cpp index 2c6c79b79a..ecd2392ec6 100644 --- a/Source/Core/DebuggerWX/src/BreakpointView.cpp +++ b/Source/Core/DebuggerWX/src/BreakpointView.cpp @@ -54,17 +54,22 @@ CBreakPointView::Update() const TBreakPoint& rBP = rBreakPoints[i]; if (!rBP.bTemporary) { - int Item = InsertItem(0, rBP.bOn ? "on" : " "); - SetItem(Item, 1, "BP"); + wxString temp; + temp = wxString::FromAscii(rBP.bOn ? "on" : " "); + int Item = InsertItem(0, temp); + temp = wxString::FromAscii("BP"); + SetItem(Item, 1, temp); Debugger::XSymbolIndex index = Debugger::FindSymbol(rBP.iAddress); if (index > 0) { - SetItem(Item, 2, Debugger::GetDescription(rBP.iAddress)); + temp = wxString::FromAscii(Debugger::GetDescription(rBP.iAddress)); + SetItem(Item, 2, temp); } sprintf(szBuffer, "0x%08x", rBP.iAddress); - SetItem(Item, 3, szBuffer); + temp = wxString::FromAscii(szBuffer); + SetItem(Item, 3, temp); SetItemData(Item, rBP.iAddress); } @@ -82,4 +87,4 @@ CBreakPointView::Update() u32 Address = GetItemData(Item); CBreakPoints::DeleteElementByAddress(Address); } -} \ No newline at end of file +} diff --git a/Source/Core/DebuggerWX/src/BreakpointWindow.cpp b/Source/Core/DebuggerWX/src/BreakpointWindow.cpp index 7017057561..303eb96f21 100644 --- a/Source/Core/DebuggerWX/src/BreakpointWindow.cpp +++ b/Source/Core/DebuggerWX/src/BreakpointWindow.cpp @@ -3,7 +3,7 @@ // #include "Debugger.h" -#include "BreakPointWindow.h" +#include "BreakpointWindow.h" #include "BreakpointView.h" #include "CodeWindow.h" #include "HW/Memmap.h" diff --git a/Source/Core/DebuggerWX/src/CodeView.cpp b/Source/Core/DebuggerWX/src/CodeView.cpp index 646a1b3543..dad9bb7360 100644 --- a/Source/Core/DebuggerWX/src/CodeView.cpp +++ b/Source/Core/DebuggerWX/src/CodeView.cpp @@ -163,14 +163,14 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event) break; case IDM_COPYCODE: - wxTheClipboard->SetData(new wxTextDataObject(debugger->disasm(selection))); + wxTheClipboard->SetData(new wxTextDataObject(wxString::FromAscii(debugger->disasm(selection)))); //Have to manually convert from char* to wxString, don't have to in Windows? break; case IDM_COPYHEX: { char temp[24]; sprintf(temp, "%08x", debugger->readMemory(selection)); - wxTheClipboard->SetData(new wxTextDataObject(temp)); + wxTheClipboard->SetData(new wxTextDataObject(wxString::FromAscii(temp))); } break; #endif @@ -205,9 +205,9 @@ void CCodeView::OnMouseUpR(wxMouseEvent& event) wxMenu menu; //menu.Append(IDM_GOTOINMEMVIEW, "&Goto in mem view"); #if wxUSE_CLIPBOARD - menu.Append(IDM_COPYADDRESS, "Copy &address"); - menu.Append(IDM_COPYCODE, "Copy &code"); - menu.Append(IDM_COPYHEX, "Copy &hex"); + menu.Append(IDM_COPYADDRESS, wxString::FromAscii("Copy &address")); + menu.Append(IDM_COPYCODE, wxString::FromAscii("Copy &code")); + menu.Append(IDM_COPYHEX, wxString::FromAscii("Copy &hex")); #endif menu.Append(IDM_RUNTOHERE, _T("&Run To Here")); //menu.Append(IDM_DYNARECRESULTS, "Copy &address"); diff --git a/Source/Core/DebuggerWX/src/CodeWindow.cpp b/Source/Core/DebuggerWX/src/CodeWindow.cpp index 1f76422786..c2d2935423 100644 --- a/Source/Core/DebuggerWX/src/CodeWindow.cpp +++ b/Source/Core/DebuggerWX/src/CodeWindow.cpp @@ -39,7 +39,7 @@ #include "LogManager.h" // ugly that this lib included code from the main -#include "../../DolphinWX/src/globals.h" +#include "../../DolphinWX/src/Globals.h" class SymbolList : public wxListCtrl @@ -348,7 +348,7 @@ void CCodeWindow::Update() } else { - callstack->Append("invalid callstack"); + callstack->Append(wxString::FromAscii("invalid callstack")); } UpdateButtonStates(); diff --git a/Source/Core/DebuggerWX/src/LogWindow.cpp b/Source/Core/DebuggerWX/src/LogWindow.cpp index cb47b64d91..0cd1233823 100644 --- a/Source/Core/DebuggerWX/src/LogWindow.cpp +++ b/Source/Core/DebuggerWX/src/LogWindow.cpp @@ -74,7 +74,7 @@ CLogWindow::CLogWindow(wxWindow* parent) void CLogWindow::OnSubmit(wxCommandEvent& event) { - Console_Submit(m_cmdline->GetValue().c_str()); + Console_Submit(m_cmdline->GetValue().To8BitData()); m_cmdline->SetValue(_T("")); NotifyUpdate(); } @@ -128,7 +128,7 @@ void CLogWindow::UpdateChecks() for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; i++) { - m_checks->Append(LogManager::m_Log[i]->m_szName); + m_checks->Append(wxString::FromAscii(LogManager::m_Log[i]->m_szName)); } m_checks->Show(true); @@ -218,7 +218,7 @@ void CLogWindow::UpdateLog() } *p = 0; //end the string - m_log->SetValue(m_logBuffer); + m_log->SetValue(wxString::FromAscii(m_logBuffer)); m_log->SetInsertionPoint(p - m_logBuffer - 1); } diff --git a/Source/Core/DebuggerWX/src/RegisterView.cpp b/Source/Core/DebuggerWX/src/RegisterView.cpp index 2373d09a31..9c2996bf81 100644 --- a/Source/Core/DebuggerWX/src/RegisterView.cpp +++ b/Source/Core/DebuggerWX/src/RegisterView.cpp @@ -39,10 +39,10 @@ CRegisterView::CRegisterView(wxWindow* parent, const wxWindowID id, const wxPoin for (int i = 0; i < 16; i++) { // 0-15 - int Item = InsertItem(0, GetGRPName(i)); + int Item = InsertItem(0, wxString::FromAscii(GetGRPName(i))); // 16-31 - SetItem(Item, 2, GetGRPName(16 + i)); + SetItem(Item, 2, wxString::FromAscii(GetGRPName(16 + i))); // just for easy sort diff --git a/Source/Core/DebuggerWX/src/SConscript b/Source/Core/DebuggerWX/src/SConscript index 6386758b1c..6827bf2ff7 100644 --- a/Source/Core/DebuggerWX/src/SConscript +++ b/Source/Core/DebuggerWX/src/SConscript @@ -1,6 +1,9 @@ Import('env') files = ["LogWindow.cpp", + "BreakpointView.cpp", + "CodeView.cpp", + "BreakpointWindow.cpp", "CodeWindow.cpp", "CodeView.cpp", "Debugger.cpp", -- cgit v1.2.3