mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-04 20:06:41 +01:00
Fix up wxw asserts and exceptions caused by: the "booting..." msg, hacked up tooltips in the debugger, and the staticbitmaps in wiimoteframe.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1479 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
2cbef47d0e
commit
514826f282
@ -60,7 +60,7 @@ std::string GetLastErrorAsString()
|
|||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
/* Loading means loading the dll with LoadLibrary() to get an instance to the dll.
|
/* Loading means loading the dll with LoadLibrary() to get an instance to the dll.
|
||||||
This is done when Dolphin is started to determine which dlls are good, and
|
This is done when Dolphin is started to determine which dlls are good, and
|
||||||
before opening the Config and Debugging windowses from Plugin.cpp and
|
before opening the Config and Debugging windows from Plugin.cpp and
|
||||||
before opening the dll for running the emulation in Video_...cpp in Core. */
|
before opening the dll for running the emulation in Video_...cpp in Core. */
|
||||||
// -----------------------
|
// -----------------------
|
||||||
int DynamicLibrary::Load(const char* filename)
|
int DynamicLibrary::Load(const char* filename)
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
// File description
|
// File description
|
||||||
// -------------
|
// -------------
|
||||||
/* This file is a simpler version of Plugin_...cpp found in Core. This file only loads
|
/* This file is a simpler version of Plugin_...cpp found in Core. This file only loads
|
||||||
the config and debugging windowses and works with all plugins. */
|
the config and debugging windows and works with all plugins. */
|
||||||
// =============
|
// =============
|
||||||
|
|
||||||
|
|
||||||
|
@ -247,8 +247,6 @@ void Callback_DebuggerBreak()
|
|||||||
|
|
||||||
THREAD_RETURN EmuThread(void *pArg)
|
THREAD_RETURN EmuThread(void *pArg)
|
||||||
{
|
{
|
||||||
Host_BootingStarted();
|
|
||||||
|
|
||||||
Common::SetCurrentThreadName("Emuthread - starting");
|
Common::SetCurrentThreadName("Emuthread - starting");
|
||||||
const SCoreStartupParameter& _CoreParameter = *(SCoreStartupParameter*)pArg;
|
const SCoreStartupParameter& _CoreParameter = *(SCoreStartupParameter*)pArg;
|
||||||
|
|
||||||
@ -332,7 +330,6 @@ THREAD_RETURN EmuThread(void *pArg)
|
|||||||
// update the window again because all stuff is initialized
|
// update the window again because all stuff is initialized
|
||||||
Host_UpdateDisasmDialog();
|
Host_UpdateDisasmDialog();
|
||||||
Host_UpdateMainFrame();
|
Host_UpdateMainFrame();
|
||||||
Host_BootingEnded();
|
|
||||||
|
|
||||||
//This thread, after creating the EmuWindow, spawns a CPU thread,
|
//This thread, after creating the EmuWindow, spawns a CPU thread,
|
||||||
//then takes over and becomes the graphics thread
|
//then takes over and becomes the graphics thread
|
||||||
|
@ -36,8 +36,6 @@
|
|||||||
// The host can be just a command line app that opens a window, or a full blown debugger
|
// The host can be just a command line app that opens a window, or a full blown debugger
|
||||||
// interface.
|
// interface.
|
||||||
|
|
||||||
void Host_BootingStarted();
|
|
||||||
void Host_BootingEnded();
|
|
||||||
void Host_UpdateMainFrame();
|
void Host_UpdateMainFrame();
|
||||||
void Host_UpdateDisasmDialog();
|
void Host_UpdateDisasmDialog();
|
||||||
void Host_UpdateLogDisplay();
|
void Host_UpdateLogDisplay();
|
||||||
|
@ -79,17 +79,12 @@ extern "C" {
|
|||||||
static const long TOOLBAR_STYLE = wxTB_FLAT | wxTB_DOCKABLE | wxTB_TEXT;
|
static const long TOOLBAR_STYLE = wxTB_FLAT | wxTB_DOCKABLE | wxTB_TEXT;
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(CCodeWindow, wxFrame)
|
BEGIN_EVENT_TABLE(CCodeWindow, wxFrame)
|
||||||
EVT_LISTBOX(IDM_SYMBOLLIST, CCodeWindow::OnSymbolListChange)
|
EVT_LISTBOX(ID_SYMBOLLIST, CCodeWindow::OnSymbolListChange)
|
||||||
EVT_LISTBOX(IDM_CALLSTACKLIST, CCodeWindow::OnCallstackListChange)
|
EVT_LISTBOX(ID_CALLSTACKLIST, CCodeWindow::OnCallstackListChange)
|
||||||
EVT_LISTBOX(IDM_CALLERSLIST, CCodeWindow::OnCallersListChange)
|
EVT_LISTBOX(ID_CALLERSLIST, CCodeWindow::OnCallersListChange)
|
||||||
EVT_LISTBOX(IDM_CALLSLIST, CCodeWindow::OnCallsListChange)
|
EVT_LISTBOX(ID_CALLSLIST, CCodeWindow::OnCallsListChange)
|
||||||
EVT_HOST_COMMAND(wxID_ANY, CCodeWindow::OnHostMessage)
|
EVT_HOST_COMMAND(wxID_ANY, CCodeWindow::OnHostMessage)
|
||||||
|
|
||||||
EVT_MENU_HIGHLIGHT_ALL( CCodeWindow::OnStatusBar)
|
|
||||||
/* Do this to to avoid that the ToolTips get stuck when only the wxMenu is changed
|
|
||||||
and not any wxMenuItem that is required by EVT_MENU_HIGHLIGHT_ALL */
|
|
||||||
EVT_UPDATE_UI(wxID_ANY, CCodeWindow::OnStatusBar_)
|
|
||||||
|
|
||||||
EVT_MENU(IDM_LOGWINDOW, CCodeWindow::OnToggleLogWindow)
|
EVT_MENU(IDM_LOGWINDOW, CCodeWindow::OnToggleLogWindow)
|
||||||
EVT_MENU(IDM_REGISTERWINDOW, CCodeWindow::OnToggleRegisterWindow)
|
EVT_MENU(IDM_REGISTERWINDOW, CCodeWindow::OnToggleRegisterWindow)
|
||||||
EVT_MENU(IDM_BREAKPOINTWINDOW, CCodeWindow::OnToggleBreakPointWindow)
|
EVT_MENU(IDM_BREAKPOINTWINDOW, CCodeWindow::OnToggleBreakPointWindow)
|
||||||
@ -137,7 +132,7 @@ BEGIN_EVENT_TABLE(CCodeWindow, wxFrame)
|
|||||||
EVT_MENU(IDM_GOTOPC, CCodeWindow::OnCodeStep)
|
EVT_MENU(IDM_GOTOPC, CCodeWindow::OnCodeStep)
|
||||||
EVT_TEXT(IDM_ADDRBOX, CCodeWindow::OnAddrBoxChange)
|
EVT_TEXT(IDM_ADDRBOX, CCodeWindow::OnAddrBoxChange)
|
||||||
|
|
||||||
EVT_COMMAND(IDM_CODEVIEW, wxEVT_CODEVIEW_CHANGE, CCodeWindow::OnCodeViewChange)
|
EVT_COMMAND(ID_CODEVIEW, wxEVT_CODEVIEW_CHANGE, CCodeWindow::OnCodeViewChange)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
#define wxGetBitmapFromMemory(name) _wxGetBitmapFromMemory(name, sizeof(name))
|
#define wxGetBitmapFromMemory(name) _wxGetBitmapFromMemory(name, sizeof(name))
|
||||||
@ -178,7 +173,7 @@ CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter
|
|||||||
wxKeyEventHandler(CCodeWindow::OnKeyDown),
|
wxKeyEventHandler(CCodeWindow::OnKeyDown),
|
||||||
(wxObject*)0, this);
|
(wxObject*)0, this);
|
||||||
|
|
||||||
// Load settings for selectable windowses, but only if they have been created
|
// Load settings for selectable windows, but only if they have been created
|
||||||
this->Load(file);
|
this->Load(file);
|
||||||
if (m_BreakpointWindow) m_BreakpointWindow->Load(file);
|
if (m_BreakpointWindow) m_BreakpointWindow->Load(file);
|
||||||
if (m_RegisterWindow) m_RegisterWindow->Load(file);
|
if (m_RegisterWindow) m_RegisterWindow->Load(file);
|
||||||
@ -268,14 +263,14 @@ void CCodeWindow::CreateGUIControls(const SCoreStartupParameter& _LocalCoreStart
|
|||||||
|
|
||||||
DebugInterface* di = new PPCDebugInterface();
|
DebugInterface* di = new PPCDebugInterface();
|
||||||
|
|
||||||
codeview = new CCodeView(di, this, IDM_CODEVIEW);
|
codeview = new CCodeView(di, this, ID_CODEVIEW);
|
||||||
sizerBig->Add(sizerLeft, 2, wxEXPAND);
|
sizerBig->Add(sizerLeft, 2, wxEXPAND);
|
||||||
sizerBig->Add(codeview, 5, wxEXPAND);
|
sizerBig->Add(codeview, 5, wxEXPAND);
|
||||||
|
|
||||||
sizerLeft->Add(callstack = new wxListBox(this, IDM_CALLSTACKLIST, wxDefaultPosition, wxSize(90, 100)), 0, wxEXPAND);
|
sizerLeft->Add(callstack = new wxListBox(this, ID_CALLSTACKLIST, wxDefaultPosition, wxSize(90, 100)), 0, wxEXPAND);
|
||||||
sizerLeft->Add(symbols = new wxListBox(this, IDM_SYMBOLLIST, wxDefaultPosition, wxSize(90, 100), 0, NULL, wxLB_SORT), 1, wxEXPAND);
|
sizerLeft->Add(symbols = new wxListBox(this, ID_SYMBOLLIST, wxDefaultPosition, wxSize(90, 100), 0, NULL, wxLB_SORT), 1, wxEXPAND);
|
||||||
sizerLeft->Add(calls = new wxListBox(this, IDM_CALLSLIST, wxDefaultPosition, wxSize(90, 100), 0, NULL, wxLB_SORT), 0, wxEXPAND);
|
sizerLeft->Add(calls = new wxListBox(this, ID_CALLSLIST, wxDefaultPosition, wxSize(90, 100), 0, NULL, wxLB_SORT), 0, wxEXPAND);
|
||||||
sizerLeft->Add(callers = new wxListBox(this, IDM_CALLERSLIST, wxDefaultPosition, wxSize(90, 100), 0, NULL, wxLB_SORT), 0, wxEXPAND);
|
sizerLeft->Add(callers = new wxListBox(this, ID_CALLERSLIST, wxDefaultPosition, wxSize(90, 100), 0, NULL, wxLB_SORT), 0, wxEXPAND);
|
||||||
|
|
||||||
SetSizer(sizerBig);
|
SetSizer(sizerBig);
|
||||||
|
|
||||||
@ -345,39 +340,24 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
|
|||||||
{
|
{
|
||||||
|
|
||||||
// =======================================================================================
|
// =======================================================================================
|
||||||
// Windowses
|
// Windows
|
||||||
// ---------------
|
// ---------------
|
||||||
pMenuBar = new wxMenuBar(wxMB_DOCKABLE);
|
pMenuBar = new wxMenuBar(wxMB_DOCKABLE);
|
||||||
|
|
||||||
{
|
{
|
||||||
wxMenu* pCoreMenu = new wxMenu;
|
wxMenu* pCoreMenu = new wxMenu;
|
||||||
|
|
||||||
wxMenuItem* interpreter = pCoreMenu->Append(IDM_INTERPRETER, _T("&Interpreter core")
|
wxMenuItem* interpreter = pCoreMenu->Append(IDM_INTERPRETER, _T("&Interpreter core"), wxEmptyString, wxITEM_CHECK);
|
||||||
, wxString::FromAscii("This is nessesary to get break points"
|
|
||||||
" and stepping to work as explained in the Developer Documentation. But it can be very"
|
|
||||||
" slow, perhaps slower than 1 fps.")
|
|
||||||
, wxITEM_CHECK);
|
|
||||||
interpreter->Check(!_LocalCoreStartupParameter.bUseJIT);
|
interpreter->Check(!_LocalCoreStartupParameter.bUseJIT);
|
||||||
pCoreMenu->AppendSeparator();
|
pCoreMenu->AppendSeparator();
|
||||||
wxMenuItem* automaticstart = pCoreMenu->Append(IDM_AUTOMATICSTART, _T("&Automatic start")
|
wxMenuItem* automaticstart = pCoreMenu->Append(IDM_AUTOMATICSTART, _T("&Automatic start"), wxEmptyString, wxITEM_CHECK);
|
||||||
, wxString::FromAscii("Start the game directly instead of booting to pause. It also"
|
|
||||||
" automatically loads the Default ISO when Dolphin starts, or the last game you loaded"
|
|
||||||
" , if you have not given it an elf file with the --elf command line. This can be"
|
|
||||||
" convenient if you are bugtesting with a certain game and want to rebuild"
|
|
||||||
" and retry it several times, either with changes to Dolphin or if you are"
|
|
||||||
" developing a homebrew game.")
|
|
||||||
, wxITEM_CHECK);
|
|
||||||
automaticstart->Check(bAutomaticStart);
|
automaticstart->Check(bAutomaticStart);
|
||||||
pCoreMenu->AppendSeparator();
|
pCoreMenu->AppendSeparator();
|
||||||
|
|
||||||
#ifdef JIT_OFF_OPTIONS
|
#ifdef JIT_OFF_OPTIONS
|
||||||
jitunlimited = pCoreMenu->Append(IDM_JITUNLIMITED, _T("&Unlimited JIT Cache"),
|
jitunlimited = pCoreMenu->Append(IDM_JITUNLIMITED, _T("&Unlimited JIT Cache"), wxEmptyString, wxITEM_CHECK);
|
||||||
_T("Avoid any involuntary JIT cache clearing, this may prevent Zelda TP from crashing"),
|
|
||||||
wxITEM_CHECK);
|
|
||||||
pCoreMenu->AppendSeparator();
|
pCoreMenu->AppendSeparator();
|
||||||
jitoff = pCoreMenu->Append(IDM_JITOFF, _T("&JIT off (JIT core)"),
|
jitoff = pCoreMenu->Append(IDM_JITOFF, _T("&JIT off (JIT core)"), wxEmptyString, wxITEM_CHECK);
|
||||||
_T("Turn off all JIT functions, but still use the JIT core from Jit.cpp"),
|
|
||||||
wxITEM_CHECK);
|
|
||||||
jitlsoff = pCoreMenu->Append(IDM_JITLSOFF, _T("&JIT LoadStore off"), wxEmptyString, wxITEM_CHECK);
|
jitlsoff = pCoreMenu->Append(IDM_JITLSOFF, _T("&JIT LoadStore off"), wxEmptyString, wxITEM_CHECK);
|
||||||
jitlslbzxoff = pCoreMenu->Append(IDM_JITLSLBZXOFF, _T(" &JIT LoadStore lbzx off"), wxEmptyString, wxITEM_CHECK);
|
jitlslbzxoff = pCoreMenu->Append(IDM_JITLSLBZXOFF, _T(" &JIT LoadStore lbzx off"), wxEmptyString, wxITEM_CHECK);
|
||||||
jitlslxzoff = pCoreMenu->Append(IDM_JITLSLXZOFF, _T(" &JIT LoadStore lXz off"), wxEmptyString, wxITEM_CHECK);
|
jitlslxzoff = pCoreMenu->Append(IDM_JITLSLXZOFF, _T(" &JIT LoadStore lXz off"), wxEmptyString, wxITEM_CHECK);
|
||||||
@ -390,8 +370,8 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
|
|||||||
jitsroff = pCoreMenu->Append(IDM_JITSROFF, _T("&JIT SystemRegisters off"), wxEmptyString, wxITEM_CHECK);
|
jitsroff = pCoreMenu->Append(IDM_JITSROFF, _T("&JIT SystemRegisters off"), wxEmptyString, wxITEM_CHECK);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// wxMenuItem* dualcore = pDebugMenu->Append(IDM_DUALCORE, _T("&DualCore"), wxEmptyString, wxITEM_CHECK);
|
//wxMenuItem* dualcore = pDebugMenu->Append(IDM_DUALCORE, _T("&DualCore"), wxEmptyString, wxITEM_CHECK);
|
||||||
// dualcore->Check(_LocalCoreStartupParameter.bUseDualCore);
|
//dualcore->Check(_LocalCoreStartupParameter.bUseDualCore);
|
||||||
|
|
||||||
pMenuBar->Append(pCoreMenu, _T("&CPU Mode"));
|
pMenuBar->Append(pCoreMenu, _T("&CPU Mode"));
|
||||||
|
|
||||||
@ -438,13 +418,7 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
|
|||||||
pSymbolsMenu->Append(IDM_LOADMAPFILE, _T("&Load symbol map"));
|
pSymbolsMenu->Append(IDM_LOADMAPFILE, _T("&Load symbol map"));
|
||||||
pSymbolsMenu->Append(IDM_SAVEMAPFILE, _T("&Save symbol map"));
|
pSymbolsMenu->Append(IDM_SAVEMAPFILE, _T("&Save symbol map"));
|
||||||
pSymbolsMenu->AppendSeparator();
|
pSymbolsMenu->AppendSeparator();
|
||||||
pSymbolsMenu->Append(IDM_SAVEMAPFILEWITHCODES, _T("Save code"),
|
pSymbolsMenu->Append(IDM_SAVEMAPFILEWITHCODES, _T("Save code"));
|
||||||
wxString::FromAscii("Save the entire disassembled code. This may take a several seconds"
|
|
||||||
" and may require between 50 and 100 MB of hard drive space. It will only save code"
|
|
||||||
" that are in the first 4 MB of memory, if you are debugging a game that load .rel"
|
|
||||||
" files with code to memory you may want to increase that to perhaps 8 MB, you can do"
|
|
||||||
" that from SymbolDB::SaveMap().")
|
|
||||||
);
|
|
||||||
|
|
||||||
pSymbolsMenu->AppendSeparator();
|
pSymbolsMenu->AppendSeparator();
|
||||||
pSymbolsMenu->Append(IDM_CREATESIGNATUREFILE, _T("&Create signature file..."));
|
pSymbolsMenu->Append(IDM_CREATESIGNATUREFILE, _T("&Create signature file..."));
|
||||||
@ -484,10 +458,10 @@ bool CCodeWindow::AutomaticStart()
|
|||||||
return GetMenuBar()->IsChecked(IDM_AUTOMATICSTART);
|
return GetMenuBar()->IsChecked(IDM_AUTOMATICSTART);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CCodeWindow::UseDualCore()
|
//bool CCodeWindow::UseDualCore()
|
||||||
{
|
//{
|
||||||
return GetMenuBar()->IsChecked(IDM_DUALCORE);
|
// return GetMenuBar()->IsChecked(IDM_DUALCORE);
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
// =======================================================================================
|
// =======================================================================================
|
||||||
@ -929,47 +903,8 @@ void CCodeWindow::OnSymbolListContextMenu(wxContextMenuEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// =======================================================================================
|
|
||||||
// Show Tool Tip for menu items
|
|
||||||
// --------------
|
|
||||||
void CCodeWindow::DoTip(wxString text)
|
|
||||||
{
|
|
||||||
// Create a blank tooltip to clear the eventual old one
|
|
||||||
static wxTipWindow *tw = NULL;
|
|
||||||
if (tw)
|
|
||||||
{
|
|
||||||
tw->SetTipWindowPtr(NULL);
|
|
||||||
tw->Close();
|
|
||||||
}
|
|
||||||
tw = NULL;
|
|
||||||
|
|
||||||
// Don't make a new one for blank text
|
|
||||||
if(text.empty()) return;
|
|
||||||
|
|
||||||
tw = new wxTipWindow(this, text, 175, &tw);
|
|
||||||
|
|
||||||
// Move it to the right
|
|
||||||
#ifdef _WIN32
|
|
||||||
POINT point;
|
|
||||||
GetCursorPos(&point);
|
|
||||||
tw->SetPosition(wxPoint(point.x + 25, point.y));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
// See the comment under BEGIN_EVENT_TABLE for explanation of why we use these two
|
|
||||||
void CCodeWindow::OnStatusBar(wxMenuEvent& event)
|
|
||||||
{
|
|
||||||
DoTip(pMenuBar->GetHelpString(event.GetId()));
|
|
||||||
}
|
|
||||||
void CCodeWindow::OnStatusBar_(wxUpdateUIEvent& event)
|
|
||||||
{
|
|
||||||
DoTip(pMenuBar->GetHelpString(event.GetId()));
|
|
||||||
}
|
|
||||||
// ===========
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Show and hide windowses
|
// Show and hide windows
|
||||||
// -----------------------
|
// -----------------------
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -60,29 +60,19 @@ class CCodeWindow
|
|||||||
|
|
||||||
bool UseInterpreter();
|
bool UseInterpreter();
|
||||||
bool AutomaticStart();
|
bool AutomaticStart();
|
||||||
bool UseDualCore();
|
//bool UseDualCore(); // not used
|
||||||
void JumpToAddress(u32 _Address);
|
void JumpToAddress(u32 _Address);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
ID_TOOLBAR = 500,
|
// ==============================================================
|
||||||
IDM_CODEVIEW,
|
// Menu Entries
|
||||||
IDM_DEBUG_GO,
|
// CPU Mode
|
||||||
IDM_STEP,
|
IDM_INTERPRETER = 2000, // These cannot interfere with enums in Globals.h!
|
||||||
IDM_STEPOVER,
|
//IDM_DUALCORE, // not used
|
||||||
IDM_SKIP,
|
|
||||||
IDM_SETPC,
|
|
||||||
IDM_GOTOPC,
|
|
||||||
IDM_ADDRBOX,
|
|
||||||
IDM_CALLSTACKLIST,
|
|
||||||
IDM_CALLERSLIST,
|
|
||||||
IDM_CALLSLIST,
|
|
||||||
IDM_SYMBOLLIST,
|
|
||||||
IDM_INTERPRETER,
|
|
||||||
IDM_AUTOMATICSTART,
|
IDM_AUTOMATICSTART,
|
||||||
|
|
||||||
IDM_JITUNLIMITED, IDM_JITOFF, // jit
|
IDM_JITUNLIMITED, IDM_JITOFF, // jit
|
||||||
IDM_JITLSOFF, IDM_JITLSLXZOFF, IDM_JITLSLWZOFF, IDM_JITLSLBZXOFF,
|
IDM_JITLSOFF, IDM_JITLSLXZOFF, IDM_JITLSLWZOFF, IDM_JITLSLBZXOFF,
|
||||||
IDM_JITLSPOFF, IDM_JITLSFOFF,
|
IDM_JITLSPOFF, IDM_JITLSFOFF,
|
||||||
@ -91,27 +81,52 @@ class CCodeWindow
|
|||||||
IDM_JITPOFF,
|
IDM_JITPOFF,
|
||||||
IDM_JITSROFF,
|
IDM_JITSROFF,
|
||||||
|
|
||||||
IDM_DUALCORE,
|
// Views
|
||||||
IDM_LOGWINDOW,
|
IDM_LOGWINDOW,
|
||||||
IDM_REGISTERWINDOW,
|
IDM_REGISTERWINDOW,
|
||||||
IDM_BREAKPOINTWINDOW,
|
IDM_BREAKPOINTWINDOW,
|
||||||
IDM_MEMORYWINDOW,
|
IDM_MEMORYWINDOW,
|
||||||
IDM_SOUNDWINDOW, // sound
|
IDM_JITWINDOW,
|
||||||
IDM_VIDEOWINDOW, // video
|
IDM_SOUNDWINDOW,
|
||||||
IDM_JITWINDOW, // jit
|
IDM_VIDEOWINDOW,
|
||||||
|
|
||||||
|
// Symbols
|
||||||
|
IDM_CLEARSYMBOLS,
|
||||||
|
IDM_CLEANSYMBOLS, // not used
|
||||||
IDM_SCANFUNCTIONS,
|
IDM_SCANFUNCTIONS,
|
||||||
IDM_LOGINSTRUCTIONS,
|
|
||||||
IDM_LOADMAPFILE,
|
IDM_LOADMAPFILE,
|
||||||
IDM_SAVEMAPFILE, IDM_SAVEMAPFILEWITHCODES,
|
IDM_SAVEMAPFILE, IDM_SAVEMAPFILEWITHCODES,
|
||||||
IDM_CLEARSYMBOLS,
|
|
||||||
IDM_CLEANSYMBOLS,
|
|
||||||
IDM_CREATESIGNATUREFILE,
|
IDM_CREATESIGNATUREFILE,
|
||||||
IDM_USESIGNATUREFILE,
|
IDM_USESIGNATUREFILE,
|
||||||
IDM_USESYMBOLFILE,
|
//IDM_USESYMBOLFILE, // not used
|
||||||
IDM_PATCHHLEFUNCTIONS,
|
IDM_PATCHHLEFUNCTIONS,
|
||||||
|
|
||||||
|
// JIT
|
||||||
IDM_CLEARCODECACHE,
|
IDM_CLEARCODECACHE,
|
||||||
|
IDM_LOGINSTRUCTIONS,
|
||||||
|
|
||||||
|
// Profiler
|
||||||
IDM_PROFILEBLOCKS,
|
IDM_PROFILEBLOCKS,
|
||||||
IDM_WRITEPROFILE,
|
IDM_WRITEPROFILE,
|
||||||
|
|
||||||
|
// ==============================================================
|
||||||
|
// Toolbar
|
||||||
|
ID_TOOLBAR,
|
||||||
|
IDM_DEBUG_GO,
|
||||||
|
IDM_STEP,
|
||||||
|
IDM_STEPOVER,
|
||||||
|
IDM_SKIP,
|
||||||
|
IDM_SETPC,
|
||||||
|
IDM_GOTOPC,
|
||||||
|
IDM_ADDRBOX,
|
||||||
|
|
||||||
|
// ==============================================================
|
||||||
|
// Debugger GUI Objects
|
||||||
|
ID_CODEVIEW,
|
||||||
|
ID_CALLSTACKLIST,
|
||||||
|
ID_CALLERSLIST,
|
||||||
|
ID_CALLSLIST,
|
||||||
|
ID_SYMBOLLIST
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
@ -127,6 +142,7 @@ class CCodeWindow
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
|
bool bAutomaticStart;
|
||||||
bool bLogWindow;
|
bool bLogWindow;
|
||||||
bool bRegisterWindow;
|
bool bRegisterWindow;
|
||||||
bool bBreakpointWindow;
|
bool bBreakpointWindow;
|
||||||
@ -134,7 +150,6 @@ class CCodeWindow
|
|||||||
bool bJitWindow;
|
bool bJitWindow;
|
||||||
bool bSoundWindow;
|
bool bSoundWindow;
|
||||||
bool bVideoWindow;
|
bool bVideoWindow;
|
||||||
bool bAutomaticStart;
|
|
||||||
|
|
||||||
// Sub dialogs
|
// Sub dialogs
|
||||||
wxMenuBar* pMenuBar;
|
wxMenuBar* pMenuBar;
|
||||||
@ -171,8 +186,6 @@ class CCodeWindow
|
|||||||
void OnCallsListChange(wxCommandEvent& event);
|
void OnCallsListChange(wxCommandEvent& event);
|
||||||
void OnCodeStep(wxCommandEvent& event);
|
void OnCodeStep(wxCommandEvent& event);
|
||||||
void OnCodeViewChange(wxCommandEvent &event);
|
void OnCodeViewChange(wxCommandEvent &event);
|
||||||
void OnStatusBar(wxMenuEvent &event); void OnStatusBar_(wxUpdateUIEvent &event);
|
|
||||||
void DoTip(wxString text);
|
|
||||||
void SingleCPUStep();
|
void SingleCPUStep();
|
||||||
|
|
||||||
void OnAddrBoxChange(wxCommandEvent& event);
|
void OnAddrBoxChange(wxCommandEvent& event);
|
||||||
|
@ -100,26 +100,8 @@ EVT_MENU(IDM_TOGGLE_DUALCORE, CFrame::OnToggleDualCore)
|
|||||||
EVT_MENU(IDM_TOGGLE_SKIPIDLE, CFrame::OnToggleSkipIdle)
|
EVT_MENU(IDM_TOGGLE_SKIPIDLE, CFrame::OnToggleSkipIdle)
|
||||||
EVT_MENU(IDM_TOGGLE_TOOLBAR, CFrame::OnToggleToolbar)
|
EVT_MENU(IDM_TOGGLE_TOOLBAR, CFrame::OnToggleToolbar)
|
||||||
EVT_MENU(IDM_TOGGLE_STATUSBAR, CFrame::OnToggleStatusbar)
|
EVT_MENU(IDM_TOGGLE_STATUSBAR, CFrame::OnToggleStatusbar)
|
||||||
EVT_MENU(IDM_LOADSLOT1, CFrame::OnLoadState)
|
EVT_MENU_RANGE(IDM_LOADSLOT1, IDM_LOADSLOT10, CFrame::OnLoadState)
|
||||||
EVT_MENU(IDM_LOADSLOT2, CFrame::OnLoadState)
|
EVT_MENU_RANGE(IDM_SAVESLOT1, IDM_SAVESLOT10, CFrame::OnSaveState)
|
||||||
EVT_MENU(IDM_LOADSLOT3, CFrame::OnLoadState)
|
|
||||||
EVT_MENU(IDM_LOADSLOT4, CFrame::OnLoadState)
|
|
||||||
EVT_MENU(IDM_LOADSLOT5, CFrame::OnLoadState)
|
|
||||||
EVT_MENU(IDM_LOADSLOT6, CFrame::OnLoadState)
|
|
||||||
EVT_MENU(IDM_LOADSLOT7, CFrame::OnLoadState)
|
|
||||||
EVT_MENU(IDM_LOADSLOT8, CFrame::OnLoadState)
|
|
||||||
EVT_MENU(IDM_LOADSLOT9, CFrame::OnLoadState)
|
|
||||||
EVT_MENU(IDM_LOADSLOT10, CFrame::OnLoadState)
|
|
||||||
EVT_MENU(IDM_SAVESLOT1, CFrame::OnSaveState)
|
|
||||||
EVT_MENU(IDM_SAVESLOT2, CFrame::OnSaveState)
|
|
||||||
EVT_MENU(IDM_SAVESLOT3, CFrame::OnSaveState)
|
|
||||||
EVT_MENU(IDM_SAVESLOT4, CFrame::OnSaveState)
|
|
||||||
EVT_MENU(IDM_SAVESLOT5, CFrame::OnSaveState)
|
|
||||||
EVT_MENU(IDM_SAVESLOT6, CFrame::OnSaveState)
|
|
||||||
EVT_MENU(IDM_SAVESLOT7, CFrame::OnSaveState)
|
|
||||||
EVT_MENU(IDM_SAVESLOT8, CFrame::OnSaveState)
|
|
||||||
EVT_MENU(IDM_SAVESLOT9, CFrame::OnSaveState)
|
|
||||||
EVT_MENU(IDM_SAVESLOT10, CFrame::OnSaveState)
|
|
||||||
EVT_SIZE(CFrame::MoveIcons)
|
EVT_SIZE(CFrame::MoveIcons)
|
||||||
EVT_HOST_COMMAND(wxID_ANY, CFrame::OnHostMessage)
|
EVT_HOST_COMMAND(wxID_ANY, CFrame::OnHostMessage)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
@ -144,7 +126,6 @@ CFrame::CFrame(wxFrame* parent,
|
|||||||
, m_Panel(NULL)
|
, m_Panel(NULL)
|
||||||
, m_pStatusBar(NULL)
|
, m_pStatusBar(NULL)
|
||||||
, m_pMenuBar(NULL)
|
, m_pMenuBar(NULL)
|
||||||
, m_pBootProcessDialog(NULL)
|
|
||||||
, HaveLeds(false), HaveSpeakers(false)
|
, HaveLeds(false), HaveSpeakers(false)
|
||||||
{
|
{
|
||||||
InitBitmaps();
|
InitBitmaps();
|
||||||
@ -209,10 +190,6 @@ WXLRESULT CFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// =======================================================
|
// =======================================================
|
||||||
// Create menu items
|
// Create menu items
|
||||||
// -------------
|
// -------------
|
||||||
@ -420,6 +397,12 @@ void CFrame::OnHelp(wxCommandEvent& event)
|
|||||||
// -------------
|
// -------------
|
||||||
void CFrame::OnPlay(wxCommandEvent& WXUNUSED (event))
|
void CFrame::OnPlay(wxCommandEvent& WXUNUSED (event))
|
||||||
{
|
{
|
||||||
|
// shuffle2: wxBusyInfo is meant to be created on the stack
|
||||||
|
// and only stay around for the life of the scope it's in.
|
||||||
|
// If that is not what we want, find another solution. I don't
|
||||||
|
// think such a dialog is needed anyways, so maybe kill it?
|
||||||
|
wxBusyInfo bootingDialog(wxString::FromAscii("Booting..."), this);
|
||||||
|
|
||||||
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
||||||
{
|
{
|
||||||
if (Core::GetState() == Core::CORE_RUN)
|
if (Core::GetState() == Core::CORE_RUN)
|
||||||
@ -542,33 +525,6 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
|
|||||||
UpdateGUI();
|
UpdateGUI();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IDM_BOOTING_STARTED:
|
|
||||||
if (m_pBootProcessDialog == NULL)
|
|
||||||
{
|
|
||||||
/* m_pBootProcessDialog = new wxProgressDialog
|
|
||||||
(_T("Booting the core"),
|
|
||||||
_T("Booting..."),
|
|
||||||
1, // range
|
|
||||||
this,
|
|
||||||
wxPD_APP_MODAL |
|
|
||||||
// wxPD_AUTO_HIDE | -- try this as well
|
|
||||||
wxPD_ELAPSED_TIME |
|
|
||||||
wxPD_SMOOTH // - makes indeterminate mode bar on WinXP very small
|
|
||||||
);*/
|
|
||||||
|
|
||||||
m_pBootProcessDialog = new wxBusyInfo(wxString::FromAscii("Booting..."), this);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case IDM_BOOTING_ENDED:
|
|
||||||
if (m_pBootProcessDialog != NULL)
|
|
||||||
{
|
|
||||||
// m_pBootProcessDialog->Destroy();
|
|
||||||
delete m_pBootProcessDialog;
|
|
||||||
m_pBootProcessDialog = NULL;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case IDM_UPDATESTATUSBAR:
|
case IDM_UPDATESTATUSBAR:
|
||||||
if (m_pStatusBar != NULL)
|
if (m_pStatusBar != NULL)
|
||||||
{
|
{
|
||||||
|
@ -121,8 +121,6 @@ class CFrame : public wxFrame
|
|||||||
|
|
||||||
wxToolBarToolBase* m_pToolPlay;
|
wxToolBarToolBase* m_pToolPlay;
|
||||||
|
|
||||||
wxBusyInfo* m_pBootProcessDialog;
|
|
||||||
|
|
||||||
void UpdateGUI();
|
void UpdateGUI();
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ namespace WiimoteLeds
|
|||||||
int SPEAKER_SIZE_X = 8;
|
int SPEAKER_SIZE_X = 8;
|
||||||
int SPEAKER_SIZE_Y = 8;
|
int SPEAKER_SIZE_Y = 8;
|
||||||
|
|
||||||
int ConnectionStatusWidth = 103;
|
int ConnectionStatusWidth = 103; // This needs to be wider, for vista at least
|
||||||
int ConnectionStatusOnlyAdj = 7;
|
int ConnectionStatusOnlyAdj = 7;
|
||||||
int RightmostMargin = 6;
|
int RightmostMargin = 6;
|
||||||
int SpIconMargin = 11;
|
int SpIconMargin = 11;
|
||||||
@ -104,17 +104,6 @@ void CFrame::ModifyStatusBar()
|
|||||||
if(!SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
|
if(!SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
|
||||||
{ LedsOn = false; SpeakersOn = false; }
|
{ LedsOn = false; SpeakersOn = false; }
|
||||||
|
|
||||||
/* For some reason the Debug build of wxWidgets can't use these bitmaps so it will
|
|
||||||
produce a "assert "wxWidgets Debug Alert, bmp.Ok()" failed" message and show
|
|
||||||
blank bitmaps. I check that wxUSE_STATBMP was enabled even for Debug builds so
|
|
||||||
I don't see why it wouldn't work. You can uncomment this if you find the bug.
|
|
||||||
|
|
||||||
In my case the same thing occured for CFrame::InitBitmaps() so it was not just
|
|
||||||
thse bitmaps that failed. So even with this comment you may get that warning. */
|
|
||||||
#ifdef _DEBUG
|
|
||||||
LedsOn = false; SpeakersOn = false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Declarations
|
// Declarations
|
||||||
int Fields;
|
int Fields;
|
||||||
int *Widths;
|
int *Widths;
|
||||||
@ -165,6 +154,11 @@ void CFrame::ModifyStatusBar()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update the settings
|
||||||
|
m_pStatusBar->SetFieldsCount(Fields);
|
||||||
|
m_pStatusBar->SetStatusWidths(Fields, Widths);
|
||||||
|
m_pStatusBar->SetStatusStyles(Fields, StylesFields);
|
||||||
|
|
||||||
/* Destroy and create all, and check for HaveLeds and HaveSpeakers in case we have
|
/* Destroy and create all, and check for HaveLeds and HaveSpeakers in case we have
|
||||||
gotten a confirmed on or off setting, in which case we don't do anything */
|
gotten a confirmed on or off setting, in which case we don't do anything */
|
||||||
if(!LedsOn && HaveLeds) CreateDestroy(DESTROYLEDS);
|
if(!LedsOn && HaveLeds) CreateDestroy(DESTROYLEDS);
|
||||||
@ -172,11 +166,6 @@ void CFrame::ModifyStatusBar()
|
|||||||
if(LedsOn && !HaveLeds) CreateDestroy(CREATELEDS);
|
if(LedsOn && !HaveLeds) CreateDestroy(CREATELEDS);
|
||||||
if(SpeakersOn && !HaveSpeakers) CreateDestroy(CREATESPEAKERS);
|
if(SpeakersOn && !HaveSpeakers) CreateDestroy(CREATESPEAKERS);
|
||||||
|
|
||||||
// Update the settings
|
|
||||||
m_pStatusBar->SetFieldsCount(Fields);
|
|
||||||
m_pStatusBar->SetStatusWidths(Fields, Widths);
|
|
||||||
m_pStatusBar->SetStatusStyles(Fields, StylesFields);
|
|
||||||
|
|
||||||
DoMoveIcons();
|
DoMoveIcons();
|
||||||
m_pStatusBar->Refresh(); // avoid small glitches that can occur
|
m_pStatusBar->Refresh(); // avoid small glitches that can occur
|
||||||
}
|
}
|
||||||
@ -192,7 +181,7 @@ void CFrame::CreateDestroy(int Case)
|
|||||||
case CREATELEDS:
|
case CREATELEDS:
|
||||||
{
|
{
|
||||||
CreateLeds();
|
CreateLeds();
|
||||||
//UpdateLeds(g_Leds);
|
UpdateLeds();
|
||||||
HaveLeds = true;
|
HaveLeds = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -72,8 +72,6 @@ enum
|
|||||||
IDM_UPDATESTATUSBAR,
|
IDM_UPDATESTATUSBAR,
|
||||||
IDM_UPDATEBREAKPOINTS,
|
IDM_UPDATEBREAKPOINTS,
|
||||||
IDM_HOST_MESSAGE,
|
IDM_HOST_MESSAGE,
|
||||||
IDM_BOOTING_STARTED,
|
|
||||||
IDM_BOOTING_ENDED,
|
|
||||||
IDM_HELPABOUT,
|
IDM_HELPABOUT,
|
||||||
IDM_HELPWEBSITE,
|
IDM_HELPWEBSITE,
|
||||||
IDM_HELPGOOGLECODE,
|
IDM_HELPGOOGLECODE,
|
||||||
|
@ -267,30 +267,6 @@ bool wxPanicAlert(const char* text, bool /*yes_no*/)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Host_BootingStarted()
|
|
||||||
{
|
|
||||||
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_BOOTING_STARTED);
|
|
||||||
wxPostEvent(main_frame, event);
|
|
||||||
|
|
||||||
if (g_pCodeWindow)
|
|
||||||
{
|
|
||||||
wxPostEvent(g_pCodeWindow, event);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Host_BootingEnded()
|
|
||||||
{
|
|
||||||
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_BOOTING_ENDED);
|
|
||||||
wxPostEvent(main_frame, event);
|
|
||||||
|
|
||||||
if (g_pCodeWindow)
|
|
||||||
{
|
|
||||||
wxPostEvent(g_pCodeWindow, event);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// OK, this thread boundary is DANGEROUS on linux
|
// OK, this thread boundary is DANGEROUS on linux
|
||||||
// wxPostEvent / wxAddPendingEvent is the solution.
|
// wxPostEvent / wxAddPendingEvent is the solution.
|
||||||
void Host_NotifyMapLoaded()
|
void Host_NotifyMapLoaded()
|
||||||
|
@ -26,12 +26,6 @@ bool wxPanicAlert(const char* text, bool /*yes_no*/)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Host_BootingStarted(){}
|
|
||||||
|
|
||||||
|
|
||||||
void Host_BootingEnded(){}
|
|
||||||
|
|
||||||
|
|
||||||
// OK, this thread boundary is DANGEROUS on linux
|
// OK, this thread boundary is DANGEROUS on linux
|
||||||
// wxPostEvent / wxAddPendingEvent is the solution.
|
// wxPostEvent / wxAddPendingEvent is the solution.
|
||||||
void Host_NotifyMapLoaded(){}
|
void Host_NotifyMapLoaded(){}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user