Some changes/fixes for the GUI : no need for 2 play button in the debugger, fix some issues with the console not closing as it should when floating.
Wii games now show their description in the gamelist instead of the company (= always "N/A"), fix SJIS handling using wxString code instead of Win32 code, fixes some broken characters in the gamelist and ISOProperties. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4740 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
bf6ed51b87
commit
3226d455e3
|
@ -79,72 +79,71 @@ class CPluginManager;
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(CCodeWindow, wxPanel)
|
BEGIN_EVENT_TABLE(CCodeWindow, wxPanel)
|
||||||
|
|
||||||
// Menu bar
|
// Menu bar
|
||||||
EVT_MENU(IDM_AUTOMATICSTART, CCodeWindow::OnCPUMode) // Options
|
EVT_MENU(IDM_AUTOMATICSTART, CCodeWindow::OnCPUMode) // Options
|
||||||
EVT_MENU(IDM_BOOTTOPAUSE, CCodeWindow::OnCPUMode)
|
EVT_MENU(IDM_BOOTTOPAUSE, CCodeWindow::OnCPUMode)
|
||||||
EVT_MENU(IDM_FONTPICKER, CCodeWindow::OnChangeFont)
|
EVT_MENU(IDM_FONTPICKER, CCodeWindow::OnChangeFont)
|
||||||
|
|
||||||
EVT_MENU(IDM_INTERPRETER, CCodeWindow::OnCPUMode) // Jit
|
EVT_MENU(IDM_INTERPRETER, CCodeWindow::OnCPUMode) // Jit
|
||||||
EVT_MENU(IDM_JITUNLIMITED, CCodeWindow::OnCPUMode)
|
EVT_MENU(IDM_JITUNLIMITED, CCodeWindow::OnCPUMode)
|
||||||
EVT_MENU(IDM_JITOFF, CCodeWindow::OnCPUMode)
|
EVT_MENU(IDM_JITOFF, CCodeWindow::OnCPUMode)
|
||||||
EVT_MENU(IDM_JITLSOFF, CCodeWindow::OnCPUMode)
|
EVT_MENU(IDM_JITLSOFF, CCodeWindow::OnCPUMode)
|
||||||
EVT_MENU(IDM_JITLSLXZOFF, CCodeWindow::OnCPUMode)
|
EVT_MENU(IDM_JITLSLXZOFF, CCodeWindow::OnCPUMode)
|
||||||
EVT_MENU(IDM_JITLSLWZOFF, CCodeWindow::OnCPUMode)
|
EVT_MENU(IDM_JITLSLWZOFF, CCodeWindow::OnCPUMode)
|
||||||
EVT_MENU(IDM_JITLSLBZXOFF, CCodeWindow::OnCPUMode)
|
EVT_MENU(IDM_JITLSLBZXOFF, CCodeWindow::OnCPUMode)
|
||||||
EVT_MENU(IDM_JITLSFOFF, CCodeWindow::OnCPUMode)
|
EVT_MENU(IDM_JITLSFOFF, CCodeWindow::OnCPUMode)
|
||||||
EVT_MENU(IDM_JITLSPOFF, CCodeWindow::OnCPUMode)
|
EVT_MENU(IDM_JITLSPOFF, CCodeWindow::OnCPUMode)
|
||||||
EVT_MENU(IDM_JITFPOFF, CCodeWindow::OnCPUMode)
|
EVT_MENU(IDM_JITFPOFF, CCodeWindow::OnCPUMode)
|
||||||
EVT_MENU(IDM_JITIOFF, CCodeWindow::OnCPUMode)
|
EVT_MENU(IDM_JITIOFF, CCodeWindow::OnCPUMode)
|
||||||
EVT_MENU(IDM_JITPOFF, CCodeWindow::OnCPUMode)
|
EVT_MENU(IDM_JITPOFF, CCodeWindow::OnCPUMode)
|
||||||
EVT_MENU(IDM_JITSROFF, CCodeWindow::OnCPUMode)
|
EVT_MENU(IDM_JITSROFF, CCodeWindow::OnCPUMode)
|
||||||
EVT_MENU(IDM_CLEARCODECACHE, CCodeWindow::OnJitMenu)
|
EVT_MENU(IDM_CLEARCODECACHE, CCodeWindow::OnJitMenu)
|
||||||
EVT_MENU(IDM_LOGINSTRUCTIONS, CCodeWindow::OnJitMenu)
|
EVT_MENU(IDM_LOGINSTRUCTIONS, CCodeWindow::OnJitMenu)
|
||||||
EVT_MENU(IDM_SEARCHINSTRUCTION, CCodeWindow::OnJitMenu)
|
EVT_MENU(IDM_SEARCHINSTRUCTION, CCodeWindow::OnJitMenu)
|
||||||
|
|
||||||
EVT_MENU(IDM_REGISTERWINDOW, CCodeWindow::OnToggleWindow) // View
|
EVT_MENU(IDM_REGISTERWINDOW, CCodeWindow::OnToggleWindow) // View
|
||||||
EVT_MENU(IDM_BREAKPOINTWINDOW, CCodeWindow::OnToggleWindow)
|
EVT_MENU(IDM_BREAKPOINTWINDOW, CCodeWindow::OnToggleWindow)
|
||||||
EVT_MENU(IDM_MEMORYWINDOW, CCodeWindow::OnToggleWindow)
|
EVT_MENU(IDM_MEMORYWINDOW, CCodeWindow::OnToggleWindow)
|
||||||
EVT_MENU(IDM_JITWINDOW, CCodeWindow::OnToggleWindow)
|
EVT_MENU(IDM_JITWINDOW, CCodeWindow::OnToggleWindow)
|
||||||
EVT_MENU(IDM_SOUNDWINDOW, CCodeWindow::OnToggleWindow)
|
EVT_MENU(IDM_SOUNDWINDOW, CCodeWindow::OnToggleWindow)
|
||||||
EVT_MENU(IDM_VIDEOWINDOW, CCodeWindow::OnToggleWindow)
|
EVT_MENU(IDM_VIDEOWINDOW, CCodeWindow::OnToggleWindow)
|
||||||
|
|
||||||
EVT_MENU(IDM_CLEARSYMBOLS, CCodeWindow::OnSymbolsMenu)
|
EVT_MENU(IDM_CLEARSYMBOLS, CCodeWindow::OnSymbolsMenu)
|
||||||
EVT_MENU(IDM_LOADMAPFILE, CCodeWindow::OnSymbolsMenu)
|
EVT_MENU(IDM_LOADMAPFILE, CCodeWindow::OnSymbolsMenu)
|
||||||
EVT_MENU(IDM_SCANFUNCTIONS, CCodeWindow::OnSymbolsMenu)
|
EVT_MENU(IDM_SCANFUNCTIONS, CCodeWindow::OnSymbolsMenu)
|
||||||
EVT_MENU(IDM_SAVEMAPFILE, CCodeWindow::OnSymbolsMenu)
|
EVT_MENU(IDM_SAVEMAPFILE, CCodeWindow::OnSymbolsMenu)
|
||||||
EVT_MENU(IDM_SAVEMAPFILEWITHCODES, CCodeWindow::OnSymbolsMenu)
|
EVT_MENU(IDM_SAVEMAPFILEWITHCODES, CCodeWindow::OnSymbolsMenu)
|
||||||
EVT_MENU(IDM_CREATESIGNATUREFILE, CCodeWindow::OnSymbolsMenu)
|
EVT_MENU(IDM_CREATESIGNATUREFILE, CCodeWindow::OnSymbolsMenu)
|
||||||
EVT_MENU(IDM_USESIGNATUREFILE, CCodeWindow::OnSymbolsMenu)
|
EVT_MENU(IDM_USESIGNATUREFILE, CCodeWindow::OnSymbolsMenu)
|
||||||
EVT_MENU(IDM_PATCHHLEFUNCTIONS, CCodeWindow::OnSymbolsMenu)
|
EVT_MENU(IDM_PATCHHLEFUNCTIONS, CCodeWindow::OnSymbolsMenu)
|
||||||
EVT_MENU(IDM_RENAME_SYMBOLS, CCodeWindow::OnSymbolsMenu)
|
EVT_MENU(IDM_RENAME_SYMBOLS, CCodeWindow::OnSymbolsMenu)
|
||||||
|
|
||||||
EVT_MENU(IDM_PROFILEBLOCKS, CCodeWindow::OnProfilerMenu)
|
EVT_MENU(IDM_PROFILEBLOCKS, CCodeWindow::OnProfilerMenu)
|
||||||
EVT_MENU(IDM_WRITEPROFILE, CCodeWindow::OnProfilerMenu)
|
EVT_MENU(IDM_WRITEPROFILE, CCodeWindow::OnProfilerMenu)
|
||||||
|
|
||||||
// Menu tooltips
|
// Menu tooltips
|
||||||
//EVT_MENU_HIGHLIGHT_ALL( CCodeWindow::OnStatusBar)
|
//EVT_MENU_HIGHLIGHT_ALL( CCodeWindow::OnStatusBar)
|
||||||
// Do this to to avoid that the ToolTips get stuck when only the wxMenu is changed
|
// 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
|
// and not any wxMenuItem that is required by EVT_MENU_HIGHLIGHT_ALL
|
||||||
//EVT_UPDATE_UI(wxID_ANY, CCodeWindow::OnStatusBar_)
|
//EVT_UPDATE_UI(wxID_ANY, CCodeWindow::OnStatusBar_)
|
||||||
|
|
||||||
// Toolbar
|
// Toolbar
|
||||||
EVT_MENU(IDM_DEBUG_GO, CCodeWindow::OnCodeStep)
|
EVT_MENU(IDM_STEP, CCodeWindow::OnCodeStep)
|
||||||
EVT_MENU(IDM_STEP, CCodeWindow::OnCodeStep)
|
EVT_MENU(IDM_STEPOVER, CCodeWindow::OnCodeStep)
|
||||||
EVT_MENU(IDM_STEPOVER, CCodeWindow::OnCodeStep)
|
EVT_MENU(IDM_SKIP, CCodeWindow::OnCodeStep)
|
||||||
EVT_MENU(IDM_SKIP, CCodeWindow::OnCodeStep)
|
EVT_MENU(IDM_SETPC, CCodeWindow::OnCodeStep)
|
||||||
EVT_MENU(IDM_SETPC, CCodeWindow::OnCodeStep)
|
EVT_MENU(IDM_GOTOPC, CCodeWindow::OnCodeStep)
|
||||||
EVT_MENU(IDM_GOTOPC, CCodeWindow::OnCodeStep)
|
EVT_TEXT(IDM_ADDRBOX, CCodeWindow::OnAddrBoxChange)
|
||||||
EVT_TEXT(IDM_ADDRBOX, CCodeWindow::OnAddrBoxChange)
|
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
EVT_LISTBOX(ID_SYMBOLLIST, CCodeWindow::OnSymbolListChange)
|
EVT_LISTBOX(ID_SYMBOLLIST, CCodeWindow::OnSymbolListChange)
|
||||||
EVT_LISTBOX(ID_CALLSTACKLIST, CCodeWindow::OnCallstackListChange)
|
EVT_LISTBOX(ID_CALLSTACKLIST, CCodeWindow::OnCallstackListChange)
|
||||||
EVT_LISTBOX(ID_CALLERSLIST, CCodeWindow::OnCallersListChange)
|
EVT_LISTBOX(ID_CALLERSLIST, CCodeWindow::OnCallersListChange)
|
||||||
EVT_LISTBOX(ID_CALLSLIST, CCodeWindow::OnCallsListChange)
|
EVT_LISTBOX(ID_CALLSLIST, CCodeWindow::OnCallsListChange)
|
||||||
|
|
||||||
EVT_HOST_COMMAND(wxID_ANY, CCodeWindow::OnHostMessage)
|
EVT_HOST_COMMAND(wxID_ANY, CCodeWindow::OnHostMessage)
|
||||||
|
|
||||||
//EVT_COMMAND(ID_CODEVIEW, wxEVT_CODEVIEW_CHANGE, CCodeWindow::OnCodeViewChange)
|
//EVT_COMMAND(ID_CODEVIEW, wxEVT_CODEVIEW_CHANGE, CCodeWindow::OnCodeViewChange)
|
||||||
|
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
@ -202,11 +201,11 @@ void CCodeWindow::OnHostMessage(wxCommandEvent& event)
|
||||||
case IDM_NOTIFYMAPLOADED:
|
case IDM_NOTIFYMAPLOADED:
|
||||||
NotifyMapLoaded();
|
NotifyMapLoaded();
|
||||||
break;
|
break;
|
||||||
/*
|
// Is this still necessary ?
|
||||||
case IDM_UPDATELOGDISPLAY:
|
//case IDM_UPDATELOGDISPLAY:
|
||||||
if (m_LogWindow) m_LogWindow->NotifyUpdate();
|
// if (m_LogWindow) m_LogWindow->NotifyUpdate();
|
||||||
break;
|
// break;
|
||||||
*/
|
|
||||||
case IDM_UPDATEDISASMDIALOG:
|
case IDM_UPDATEDISASMDIALOG:
|
||||||
Update();
|
Update();
|
||||||
if (m_RegisterWindow) m_RegisterWindow->NotifyUpdate();
|
if (m_RegisterWindow) m_RegisterWindow->NotifyUpdate();
|
||||||
|
@ -235,24 +234,6 @@ void CCodeWindow::OnCodeStep(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
switch (event.GetId())
|
switch (event.GetId())
|
||||||
{
|
{
|
||||||
case IDM_DEBUG_GO:
|
|
||||||
{
|
|
||||||
// [F|RES] prolly we should disable the other buttons in go mode too ...
|
|
||||||
if (CCPU::IsStepping())
|
|
||||||
{
|
|
||||||
CCPU::EnableStepping(false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CCPU::EnableStepping(true); // Break
|
|
||||||
Host_UpdateLogDisplay();
|
|
||||||
}
|
|
||||||
wxThread::Sleep(20);
|
|
||||||
JumpToAddress(PC);
|
|
||||||
Update();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case IDM_STEP:
|
case IDM_STEP:
|
||||||
SingleCPUStep();
|
SingleCPUStep();
|
||||||
break;
|
break;
|
||||||
|
@ -647,7 +628,6 @@ void CCodeWindow::PopulateToolbar(wxAuiToolBar* toolBar)
|
||||||
h = m_Bitmaps[Toolbar_DebugGo].GetHeight();
|
h = m_Bitmaps[Toolbar_DebugGo].GetHeight();
|
||||||
|
|
||||||
toolBar->SetToolBitmapSize(wxSize(w, h));
|
toolBar->SetToolBitmapSize(wxSize(w, h));
|
||||||
toolBar->AddTool(IDM_DEBUG_GO, _T("Play"), m_Bitmaps[Toolbar_DebugGo]);
|
|
||||||
toolBar->AddTool(IDM_STEP, _T("Step"), m_Bitmaps[Toolbar_Step]);
|
toolBar->AddTool(IDM_STEP, _T("Step"), m_Bitmaps[Toolbar_Step]);
|
||||||
toolBar->AddTool(IDM_STEPOVER, _T("Step Over"), m_Bitmaps[Toolbar_StepOver]);
|
toolBar->AddTool(IDM_STEPOVER, _T("Step Over"), m_Bitmaps[Toolbar_StepOver]);
|
||||||
toolBar->AddTool(IDM_SKIP, _T("Skip"), m_Bitmaps[Toolbar_Skip]);
|
toolBar->AddTool(IDM_SKIP, _T("Skip"), m_Bitmaps[Toolbar_Skip]);
|
||||||
|
@ -690,7 +670,6 @@ void CCodeWindow::UpdateButtonStates()
|
||||||
|
|
||||||
if (!Initialized)
|
if (!Initialized)
|
||||||
{
|
{
|
||||||
ToolBar->EnableTool(IDM_DEBUG_GO, false);
|
|
||||||
ToolBar->EnableTool(IDM_STEPOVER, false);
|
ToolBar->EnableTool(IDM_STEPOVER, false);
|
||||||
ToolBar->EnableTool(IDM_SKIP, false);
|
ToolBar->EnableTool(IDM_SKIP, false);
|
||||||
}
|
}
|
||||||
|
@ -698,19 +677,11 @@ void CCodeWindow::UpdateButtonStates()
|
||||||
{
|
{
|
||||||
if (!Stepping)
|
if (!Stepping)
|
||||||
{
|
{
|
||||||
ToolBar->SetToolShortHelp(IDM_DEBUG_GO, _T("&Pause"));
|
|
||||||
ToolBar->SetToolLabel(IDM_DEBUG_GO, _("Pause"));
|
|
||||||
ToolBar->SetToolBitmap(IDM_DEBUG_GO, m_Bitmaps[Toolbar_DebugPause]);
|
|
||||||
ToolBar->EnableTool(IDM_DEBUG_GO, true);
|
|
||||||
ToolBar->EnableTool(IDM_STEPOVER, false);
|
ToolBar->EnableTool(IDM_STEPOVER, false);
|
||||||
ToolBar->EnableTool(IDM_SKIP, false);
|
ToolBar->EnableTool(IDM_SKIP, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ToolBar->SetToolShortHelp(IDM_DEBUG_GO, _T("&Play"));
|
|
||||||
ToolBar->SetToolLabel(IDM_DEBUG_GO, _("Play"));
|
|
||||||
ToolBar->SetToolBitmap(IDM_DEBUG_GO, m_Bitmaps[Toolbar_DebugGo]);
|
|
||||||
ToolBar->EnableTool(IDM_DEBUG_GO, true);
|
|
||||||
ToolBar->EnableTool(IDM_STEPOVER, true);
|
ToolBar->EnableTool(IDM_STEPOVER, true);
|
||||||
ToolBar->EnableTool(IDM_SKIP, true);
|
ToolBar->EnableTool(IDM_SKIP, true);
|
||||||
}
|
}
|
||||||
|
@ -757,24 +728,6 @@ void CCodeWindow::UpdateButtonStates()
|
||||||
calls->SetFont(DebuggerFont);
|
calls->SetFont(DebuggerFont);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCodeWindow::RecreateToolbar(wxAuiToolBar * toolBar)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
// delete and recreate the toolbar
|
|
||||||
wxToolBarBase* toolBar = GetToolBar();
|
|
||||||
delete toolBar;
|
|
||||||
SetToolBar(NULL);
|
|
||||||
|
|
||||||
|
|
||||||
long style = wxTB_FLAT | wxTB_DOCKABLE | wxTB_TEXT;
|
|
||||||
style &= ~(wxTB_HORIZONTAL | wxTB_VERTICAL | wxTB_BOTTOM | wxTB_RIGHT | wxTB_HORZ_LAYOUT | wxTB_TOP);
|
|
||||||
wxToolBar* theToolBar = CreateToolBar(style, ID_TOOLBAR_DEBUG);
|
|
||||||
|
|
||||||
PopulateToolbar(theToolBar);
|
|
||||||
SetToolBar(theToolBar);
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Show Tool Tip for menu items
|
// Show Tool Tip for menu items
|
||||||
void CCodeWindow::DoTip(wxString text)
|
void CCodeWindow::DoTip(wxString text)
|
||||||
|
|
|
@ -110,12 +110,12 @@ std::string CVolumeWAD::GetName() const
|
||||||
u32 footer_size;
|
u32 footer_size;
|
||||||
|
|
||||||
if (!Read(0x1C, 4, (u8*)&footer_size))
|
if (!Read(0x1C, 4, (u8*)&footer_size))
|
||||||
return "Unknown";
|
return false;
|
||||||
|
|
||||||
// Offset to the english title
|
// Offset to the english title
|
||||||
char temp[84];
|
char temp[84];
|
||||||
if (!Read(0xF1 + OpeningBnrOffset, 84, (u8*)&temp) || Common::swap32(footer_size) < 0xF1)
|
if (!Read(0xF1 + OpeningBnrOffset, 84, (u8*)&temp) || Common::swap32(footer_size) < 0xF1)
|
||||||
return "Unknown";
|
return false;
|
||||||
|
|
||||||
// Remove the null bytes due to 16bit char length
|
// Remove the null bytes due to 16bit char length
|
||||||
std::string out_temp;
|
std::string out_temp;
|
||||||
|
|
|
@ -52,11 +52,11 @@ class CFrame : public wxFrame
|
||||||
CFrame(wxFrame* parent,
|
CFrame(wxFrame* parent,
|
||||||
wxWindowID id = wxID_ANY,
|
wxWindowID id = wxID_ANY,
|
||||||
const wxString& title = wxT("Dolphin"),
|
const wxString& title = wxT("Dolphin"),
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
bool _UseDebugger = false,
|
bool _UseDebugger = false,
|
||||||
bool ShowLogWindow = false,
|
bool ShowLogWindow = false,
|
||||||
long style = wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE);
|
long style = wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE);
|
||||||
|
|
||||||
void* GetRenderHandle()
|
void* GetRenderHandle()
|
||||||
{
|
{
|
||||||
|
@ -146,12 +146,12 @@ class CFrame : public wxFrame
|
||||||
void DoRemovePage(wxWindow *, bool Hide = true);
|
void DoRemovePage(wxWindow *, bool Hide = true);
|
||||||
void DoRemovePageId(wxWindowID Id, bool Hide = true, bool Destroy = false);
|
void DoRemovePageId(wxWindowID Id, bool Hide = true, bool Destroy = false);
|
||||||
void DoRemovePageString(wxString, bool Hide = true, bool Destroy = false);
|
void DoRemovePageString(wxString, bool Hide = true, bool Destroy = false);
|
||||||
void HidePane();
|
void TogglePane();
|
||||||
void SetSimplePaneSize();
|
void SetSimplePaneSize();
|
||||||
void SetPaneSize();
|
void SetPaneSize();
|
||||||
void ResetToolbarStyle();
|
void ResetToolbarStyle();
|
||||||
void TogglePaneStyle(bool,int);
|
void TogglePaneStyle(bool On, int EventId);
|
||||||
void ToggleNotebookStyle(long);
|
void ToggleNotebookStyle(bool On, long Style);
|
||||||
void ResizeConsole();
|
void ResizeConsole();
|
||||||
// Float window
|
// Float window
|
||||||
void DoUnfloatPage(int Id);
|
void DoUnfloatPage(int Id);
|
||||||
|
@ -344,3 +344,4 @@ class CFrame : public wxFrame
|
||||||
|
|
||||||
|
|
||||||
#endif // __FRAME_H_
|
#endif // __FRAME_H_
|
||||||
|
|
||||||
|
|
|
@ -70,22 +70,26 @@ void CFrame::OnPaneClose(wxAuiManagerEvent& event)
|
||||||
|
|
||||||
wxAuiNotebook * nb = (wxAuiNotebook*)event.pane->window;
|
wxAuiNotebook * nb = (wxAuiNotebook*)event.pane->window;
|
||||||
if (!nb) return;
|
if (!nb) return;
|
||||||
if (! (nb->GetPageCount() == 0 || (nb->GetPageCount() == 1 && nb->GetPageText(0).IsSameAs(wxT("<>")))))
|
|
||||||
|
if ((nb->GetPageText(0).IsSameAs(wxT("Log")) || nb->GetPageText(0).IsSameAs(wxT("Console"))))
|
||||||
|
{
|
||||||
|
// Closing a pane containing the logwindow or a console closes both
|
||||||
|
GetMenuBar()->FindItem(IDM_CONSOLEWINDOW)->Check(false);
|
||||||
|
GetMenuBar()->FindItem(IDM_LOGWINDOW)->Check(false);
|
||||||
|
SConfig::GetInstance().m_InterfaceConsole = false;
|
||||||
|
SConfig::GetInstance().m_InterfaceLogWindow = false;
|
||||||
|
ToggleConsole(false);
|
||||||
|
ToggleLogWindow(false);
|
||||||
|
}
|
||||||
|
else if (nb->GetPageCount() != 0 && !nb->GetPageText(0).IsSameAs(wxT("<>")))
|
||||||
{
|
{
|
||||||
wxMessageBox(wxT("You can't close panes that have pages in them."), wxT("Notice"), wxOK, this);
|
wxMessageBox(wxT("You can't close panes that have pages in them."), wxT("Notice"), wxOK, this);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
ConsoleListener* Console = LogManager::GetInstance()->getConsoleListener();
|
|
||||||
Console->Log(LogTypes::LNOTICE, StringFromFormat("GetNotebookCount before: %i\n", GetNotebookCount()).c_str());
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Detach and delete the empty notebook
|
// Detach and delete the empty notebook
|
||||||
event.pane->DestroyOnClose(true);
|
event.pane->DestroyOnClose(true);
|
||||||
m_Mgr->ClosePane(*event.pane);
|
m_Mgr->ClosePane(*event.pane);
|
||||||
|
|
||||||
//Console->Log(LogTypes::LNOTICE, StringFromFormat("GetNotebookCount after: %i\n", GetNotebookCount()).c_str());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_Mgr->Update();
|
m_Mgr->Update();
|
||||||
|
@ -110,8 +114,9 @@ void CFrame::ToggleLogWindow(bool bShow, int i)
|
||||||
DoRemovePage(m_LogWindow);
|
DoRemovePage(m_LogWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hide pane
|
// Hide or Show the pane
|
||||||
if (!g_pCodeWindow) HidePane();
|
if (!g_pCodeWindow)
|
||||||
|
TogglePane();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enable and disable the console
|
// Enable and disable the console
|
||||||
|
@ -123,48 +128,47 @@ void CFrame::OnToggleConsole(wxCommandEvent& event)
|
||||||
|
|
||||||
void CFrame::ToggleConsole(bool bShow, int i)
|
void CFrame::ToggleConsole(bool bShow, int i)
|
||||||
{
|
{
|
||||||
|
// Can anyone check this code under Linux ? commenting the windows console Hide/show
|
||||||
|
// should be enough to make it work.
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
ConsoleListener *Console = LogManager::GetInstance()->getConsoleListener();
|
ConsoleListener *Console = LogManager::GetInstance()->getConsoleListener();
|
||||||
|
|
||||||
if (bShow)
|
if (bShow)
|
||||||
{
|
{
|
||||||
//Console->Log(LogTypes::LNOTICE, StringFromFormat(" >>> Show\n").c_str());
|
|
||||||
|
|
||||||
if (GetNotebookCount() == 0) return;
|
|
||||||
if (i < 0 || i > GetNotebookCount()-1) i = 0;
|
if (i < 0 || i > GetNotebookCount()-1) i = 0;
|
||||||
|
|
||||||
wxWindow *Win = GetWxWindowHwnd(GetConsoleWindow());
|
// If the window and its page already exist, there's a bug :p
|
||||||
if (Win && GetNotebookFromId(i)->GetPageIndex(Win) != wxNOT_FOUND) return;
|
if (GetNotebookFromId(i)->GetPageIndex(GetWxWindowHwnd(GetConsoleWindow())) != wxNOT_FOUND)
|
||||||
{
|
return;
|
||||||
if(!GetConsoleWindow()) Console->Open(); else ShowWindow(GetConsoleWindow(),SW_SHOW);
|
|
||||||
}
|
// If the console doesn't exist, we create it
|
||||||
Win = GetWxWindowHwnd(GetConsoleWindow());
|
if (!GetConsoleWindow())
|
||||||
if (!Win) return;
|
Console->Open();
|
||||||
// Create parent window
|
|
||||||
wxPanel * ConsoleParent = CreateEmptyPanel(IDM_CONSOLEWINDOW);
|
|
||||||
Win->Reparent(ConsoleParent);
|
|
||||||
if (!bFloatConsoleWindow)
|
|
||||||
GetNotebookFromId(i)->AddPage(ConsoleParent, wxT("Console"), true, aNormalFile);
|
|
||||||
else
|
else
|
||||||
CreateParentFrame(WindowParentIdFromChildId(ConsoleParent->GetId()), WindowNameFromId(ConsoleParent->GetId()), ConsoleParent);
|
ShowWindow(GetConsoleWindow(), SW_SHOW); // WIN32
|
||||||
|
|
||||||
|
// We retrieve our wxWindow to access our console + its parent (which is the page)
|
||||||
|
wxWindow *ConsoleWin = GetWxWindowHwnd(GetConsoleWindow());
|
||||||
|
wxPanel *ConsoleParent = (wxPanel*)FindWindowById(IDM_CONSOLEWINDOW);
|
||||||
|
|
||||||
|
// Create the parent window if it doesn't exist, and put the console in it
|
||||||
|
if (!ConsoleParent) ConsoleParent = CreateEmptyPanel(IDM_CONSOLEWINDOW);
|
||||||
|
ConsoleWin->Reparent(ConsoleParent);
|
||||||
|
|
||||||
|
DoAddPage(ConsoleParent, i, wxT("Console"), bFloatConsoleWindow);
|
||||||
}
|
}
|
||||||
else // hide
|
else // Hide
|
||||||
{
|
{
|
||||||
//Console->Log(LogTypes::LNOTICE, StringFromFormat(" >>> Show\n").c_str());
|
if(GetConsoleWindow())
|
||||||
|
ShowWindow(GetConsoleWindow(), SW_HIDE); // WIN32
|
||||||
|
|
||||||
// Hide
|
// Then close the page
|
||||||
if(GetConsoleWindow()) ShowWindow(GetConsoleWindow(),SW_HIDE);
|
DoRemovePageId(IDM_CONSOLEWINDOW, true, true);
|
||||||
// Release the console to Windows
|
|
||||||
::SetParent(GetConsoleWindow(), NULL);
|
|
||||||
// Destroy the empty parent of the console
|
|
||||||
if (FindWindowById(WindowParentIdFromChildId(IDM_CONSOLEWINDOW)))
|
|
||||||
FindWindowById(WindowParentIdFromChildId(IDM_CONSOLEWINDOW))->Destroy();
|
|
||||||
else
|
|
||||||
DoRemovePageId(IDM_CONSOLEWINDOW, true, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hide pane
|
// Hide or Show the pane
|
||||||
if (!g_pCodeWindow) HidePane();
|
if (!g_pCodeWindow)
|
||||||
|
TogglePane();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -326,7 +330,7 @@ void CFrame::OnAllowNotebookDnD(wxAuiNotebookEvent& event)
|
||||||
event.Allow();
|
event.Allow();
|
||||||
ResizeConsole();
|
ResizeConsole();
|
||||||
}
|
}
|
||||||
void CFrame::HidePane()
|
void CFrame::TogglePane()
|
||||||
{
|
{
|
||||||
// Get the first notebook
|
// Get the first notebook
|
||||||
wxAuiNotebook * NB = NULL;
|
wxAuiNotebook * NB = NULL;
|
||||||
|
@ -377,7 +381,6 @@ void CFrame::DoRemovePageString(wxString Str, bool /*_Hide*/, bool _Destroy)
|
||||||
{
|
{
|
||||||
NB->DeletePage(j);
|
NB->DeletePage(j);
|
||||||
}
|
}
|
||||||
//if (_Hide) Win->Hide();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -450,19 +453,10 @@ void CFrame::DoAddPage(wxWindow * Win, int i, wxString Name, bool Float)
|
||||||
GetNotebookFromId(i)->AddPage(Win, Name, true, aNormalFile );
|
GetNotebookFromId(i)->AddPage(Win, Name, true, aNormalFile );
|
||||||
else
|
else
|
||||||
CreateParentFrame(WindowParentIdFromChildId(Win->GetId()), WindowNameFromId(Win->GetId()), Win);
|
CreateParentFrame(WindowParentIdFromChildId(Win->GetId()), WindowNameFromId(Win->GetId()), Win);
|
||||||
|
|
||||||
//NOTICE_LOG(CONSOLE, "DoAddPage: %i", Win->GetId());
|
|
||||||
|
|
||||||
/*
|
|
||||||
ConsoleListener* Console = LogManager::GetInstance()->getConsoleListener();
|
|
||||||
Console->Log(LogTypes::LNOTICE, StringFromFormat("Add: %s\n", Name.c_str()).c_str());
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::DoUnfloatPage(int Id)
|
void CFrame::DoUnfloatPage(int Id)
|
||||||
{
|
{
|
||||||
//NOTICE_LOG(CONSOLE, "DoUnfloatPage: %i", Id);
|
|
||||||
|
|
||||||
wxFrame * Win = (wxFrame*)this->FindWindowById(Id);
|
wxFrame * Win = (wxFrame*)this->FindWindowById(Id);
|
||||||
if (!Win) return;
|
if (!Win) return;
|
||||||
|
|
||||||
|
@ -473,20 +467,16 @@ void CFrame::DoUnfloatPage(int Id)
|
||||||
}
|
}
|
||||||
void CFrame::OnFloatingPageClosed(wxCloseEvent& event)
|
void CFrame::OnFloatingPageClosed(wxCloseEvent& event)
|
||||||
{
|
{
|
||||||
//NOTICE_LOG(CONSOLE, "OnFloatingPageClosed: %i", event.GetId());
|
|
||||||
DoUnfloatPage(event.GetId());
|
DoUnfloatPage(event.GetId());
|
||||||
}
|
}
|
||||||
void CFrame::OnFloatingPageSize(wxSizeEvent& event)
|
void CFrame::OnFloatingPageSize(wxSizeEvent& event)
|
||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
//NOTICE_LOG(CONSOLE, "OnFloatingPageClosed: %i", event.GetId());
|
|
||||||
ResizeConsole();
|
ResizeConsole();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CFrame::DoFloatNotebookPage(wxWindowID Id)
|
void CFrame::DoFloatNotebookPage(wxWindowID Id)
|
||||||
{
|
{
|
||||||
//NOTICE_LOG(CONSOLE, "DoFloatNotebookPage: %i %s", Win->GetId(), WindowNameFromId(Win->GetId()).mb_str());
|
|
||||||
wxFrame * Win = (wxFrame*)this->FindWindowById(Id);
|
wxFrame * Win = (wxFrame*)this->FindWindowById(Id);
|
||||||
if (!Win) return;
|
if (!Win) return;
|
||||||
|
|
||||||
|
@ -631,7 +621,6 @@ void CFrame::OnDropDownToolbarSelect(wxCommandEvent& event)
|
||||||
else
|
else
|
||||||
DlgOk = true;
|
DlgOk = true;
|
||||||
}
|
}
|
||||||
//wxID_CANCEL
|
|
||||||
|
|
||||||
SPerspectives Tmp;
|
SPerspectives Tmp;
|
||||||
Tmp.Name = dlg.GetValue().mb_str();
|
Tmp.Name = dlg.GetValue().mb_str();
|
||||||
|
@ -639,8 +628,8 @@ void CFrame::OnDropDownToolbarSelect(wxCommandEvent& event)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IDM_TAB_SPLIT:
|
case IDM_TAB_SPLIT:
|
||||||
m_bTabSplit = event.IsChecked();
|
m_bTabSplit = event.IsChecked();
|
||||||
ToggleNotebookStyle(wxAUI_NB_TAB_SPLIT);
|
ToggleNotebookStyle(m_bTabSplit, wxAUI_NB_TAB_SPLIT);
|
||||||
break;
|
break;
|
||||||
case IDM_NO_DOCKING:
|
case IDM_NO_DOCKING:
|
||||||
m_bNoDocking = event.IsChecked();
|
m_bNoDocking = event.IsChecked();
|
||||||
|
@ -693,11 +682,6 @@ void CFrame::TogglePaneStyle(bool On, int EventId)
|
||||||
Pane.Floatable(On);
|
Pane.Floatable(On);
|
||||||
Pane.Dockable(On);
|
Pane.Dockable(On);
|
||||||
break;
|
break;
|
||||||
/*
|
|
||||||
case IDM_NO_DOCKING:
|
|
||||||
Pane.Dockable(!On);
|
|
||||||
break;
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
Pane.Dockable(!m_bNoDocking);
|
Pane.Dockable(!m_bNoDocking);
|
||||||
}
|
}
|
||||||
|
@ -705,7 +689,7 @@ void CFrame::TogglePaneStyle(bool On, int EventId)
|
||||||
m_Mgr->Update();
|
m_Mgr->Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::ToggleNotebookStyle(long Style)
|
void CFrame::ToggleNotebookStyle(bool On, long Style)
|
||||||
{
|
{
|
||||||
wxAuiPaneInfoArray& AllPanes = m_Mgr->GetAllPanes();
|
wxAuiPaneInfoArray& AllPanes = m_Mgr->GetAllPanes();
|
||||||
for (int i = 0, Count = (int)AllPanes.GetCount(); i < Count; ++i)
|
for (int i = 0, Count = (int)AllPanes.GetCount(); i < Count; ++i)
|
||||||
|
@ -714,7 +698,12 @@ void CFrame::ToggleNotebookStyle(long Style)
|
||||||
if (Pane.window->IsKindOf(CLASSINFO(wxAuiNotebook)))
|
if (Pane.window->IsKindOf(CLASSINFO(wxAuiNotebook)))
|
||||||
{
|
{
|
||||||
wxAuiNotebook* NB = (wxAuiNotebook*)Pane.window;
|
wxAuiNotebook* NB = (wxAuiNotebook*)Pane.window;
|
||||||
NB->SetWindowStyleFlag(NB->GetWindowStyleFlag() ^ Style);
|
|
||||||
|
if (On)
|
||||||
|
NB->SetWindowStyleFlag(NB->GetWindowStyleFlag() | Style);
|
||||||
|
else
|
||||||
|
NB->SetWindowStyleFlag(NB->GetWindowStyleFlag() &~ Style);
|
||||||
|
|
||||||
NB->Refresh();
|
NB->Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -838,10 +827,6 @@ void CFrame::ReloadPanes()
|
||||||
// Keep settings
|
// Keep settings
|
||||||
bool bConsole = SConfig::GetInstance().m_InterfaceConsole;
|
bool bConsole = SConfig::GetInstance().m_InterfaceConsole;
|
||||||
|
|
||||||
//ListChildren();
|
|
||||||
//ConsoleListener* Console = LogManager::GetInstance()->getConsoleListener();
|
|
||||||
//Console->Log(LogTypes::LNOTICE, StringFromFormat("ReloadPanes begin: Sound %i\n", FindWindowByName(wxT("Sound"))).c_str());
|
|
||||||
|
|
||||||
if (ActivePerspective >= Perspectives.size()) ActivePerspective = 0;
|
if (ActivePerspective >= Perspectives.size()) ActivePerspective = 0;
|
||||||
|
|
||||||
// Check that there is a perspective
|
// Check that there is a perspective
|
||||||
|
@ -903,13 +888,6 @@ void CFrame::DoLoadPerspective()
|
||||||
SetPaneSize();
|
SetPaneSize();
|
||||||
// Show
|
// Show
|
||||||
ShowAllNotebooks(true);
|
ShowAllNotebooks(true);
|
||||||
|
|
||||||
/*
|
|
||||||
ConsoleListener* Console = LogManager::GetInstance()->getConsoleListener();
|
|
||||||
Console->Log(LogTypes::LNOTICE, StringFromFormat(
|
|
||||||
"Loaded: %s (%i panes, %i NBs)\n",
|
|
||||||
Perspectives.at(ActivePerspective).Name.c_str(), m_Mgr->GetAllPanes().GetCount(), GetNotebookCount()).c_str());
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the local perspectives array
|
// Update the local perspectives array
|
||||||
|
@ -1009,12 +987,6 @@ void CFrame::Save()
|
||||||
// Update the local vector
|
// Update the local vector
|
||||||
SaveLocal();
|
SaveLocal();
|
||||||
|
|
||||||
/*
|
|
||||||
ConsoleListener* Console = LogManager::GetInstance()->getConsoleListener();
|
|
||||||
Console->Log(LogTypes::LNOTICE, StringFromFormat(
|
|
||||||
"Saved: %s (%s, %i panes, %i NBs)\n",
|
|
||||||
Perspectives.at(ActivePerspective).Name.c_str(), STmp.c_str(), m_Mgr->GetAllPanes().GetCount(), GetNotebookCount()).c_str());
|
|
||||||
*/
|
|
||||||
|
|
||||||
TogglePaneStyle(m_bEdit, IDM_EDIT_PERSPECTIVES);
|
TogglePaneStyle(m_bEdit, IDM_EDIT_PERSPECTIVES);
|
||||||
}
|
}
|
||||||
|
@ -1207,14 +1179,9 @@ void CFrame::CloseAllNotebooks()
|
||||||
//m_Mgr->DetachPane(m_Mgr->GetAllPanes().Item(i).window);
|
//m_Mgr->DetachPane(m_Mgr->GetAllPanes().Item(i).window);
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
//Console->Log(LogTypes::LNOTICE, StringFromFormat(" %i Pane\n", i).c_str());
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
i++;
|
i++;
|
||||||
//Console->Log(LogTypes::LNOTICE, StringFromFormat(" %i No pane\n", i).c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int CFrame::GetNotebookCount()
|
int CFrame::GetNotebookCount()
|
||||||
|
|
|
@ -60,6 +60,8 @@ Core::GetWindowHandle().
|
||||||
#include "ConfigManager.h" // Core
|
#include "ConfigManager.h" // Core
|
||||||
#include "Core.h"
|
#include "Core.h"
|
||||||
#include "OnFrame.h"
|
#include "OnFrame.h"
|
||||||
|
#include "HW/CPU.h"
|
||||||
|
#include "PowerPC/PowerPC.h"
|
||||||
#include "HW/DVDInterface.h"
|
#include "HW/DVDInterface.h"
|
||||||
#include "HW/ProcessorInterface.h"
|
#include "HW/ProcessorInterface.h"
|
||||||
#include "IPC_HLE/WII_IPC_HLE_Device_usb.h"
|
#include "IPC_HLE/WII_IPC_HLE_Device_usb.h"
|
||||||
|
@ -293,6 +295,7 @@ void CFrame::PopulateToolbar(wxAuiToolBar* ToolBar)
|
||||||
// the changes
|
// the changes
|
||||||
ToolBar->Realize();
|
ToolBar->Realize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::PopulateToolbarAui(wxAuiToolBar* ToolBar)
|
void CFrame::PopulateToolbarAui(wxAuiToolBar* ToolBar)
|
||||||
{
|
{
|
||||||
int w = m_Bitmaps[Toolbar_FileOpen].GetWidth(),
|
int w = m_Bitmaps[Toolbar_FileOpen].GetWidth(),
|
||||||
|
@ -319,6 +322,7 @@ void CFrame::RecreateToolbar()
|
||||||
}
|
}
|
||||||
|
|
||||||
m_ToolBar = new wxAuiToolBar(this, ID_TOOLBAR, wxDefaultPosition, wxDefaultSize, TOOLBAR_STYLE);
|
m_ToolBar = new wxAuiToolBar(this, ID_TOOLBAR, wxDefaultPosition, wxDefaultSize, TOOLBAR_STYLE);
|
||||||
|
|
||||||
PopulateToolbar(m_ToolBar);
|
PopulateToolbar(m_ToolBar);
|
||||||
|
|
||||||
m_Mgr->AddPane(m_ToolBar, wxAuiPaneInfo().
|
m_Mgr->AddPane(m_ToolBar, wxAuiPaneInfo().
|
||||||
|
@ -353,7 +357,7 @@ void CFrame::InitBitmaps()
|
||||||
int Theme = SConfig::GetInstance().m_LocalCoreStartupParameter.iTheme;
|
int Theme = SConfig::GetInstance().m_LocalCoreStartupParameter.iTheme;
|
||||||
|
|
||||||
// Save memory by only having one set of bitmaps loaded at any time. I mean, they are still
|
// Save memory by only having one set of bitmaps loaded at any time. I mean, they are still
|
||||||
// in the exe, which is in memory, but at least we wont make another copy of all of them. */
|
// in the exe, which is in memory, but at least we wont make another copy of all of them.
|
||||||
switch (Theme)
|
switch (Theme)
|
||||||
{
|
{
|
||||||
case BOOMY:
|
case BOOMY:
|
||||||
|
@ -458,19 +462,9 @@ void CFrame::InitBitmaps()
|
||||||
// Start the game or change the disc
|
// Start the game or change the disc
|
||||||
void CFrame::BootGame()
|
void CFrame::BootGame()
|
||||||
{
|
{
|
||||||
// Rerecording
|
|
||||||
#ifdef RERECORDING
|
|
||||||
Core::RerecordingStart();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
||||||
{
|
return;
|
||||||
if (Core::GetState() == Core::CORE_RUN)
|
|
||||||
Core::SetState(Core::CORE_PAUSE);
|
|
||||||
else
|
|
||||||
Core::SetState(Core::CORE_RUN);
|
|
||||||
UpdateGUI();
|
|
||||||
}
|
|
||||||
// Start the selected ISO, or try one of the saved paths.
|
// Start the selected ISO, or try one of the saved paths.
|
||||||
// If all that fails, ask to add a dir and don't boot
|
// If all that fails, ask to add a dir and don't boot
|
||||||
else if (m_GameListCtrl->GetSelectedISO() != NULL)
|
else if (m_GameListCtrl->GetSelectedISO() != NULL)
|
||||||
|
@ -606,6 +600,30 @@ void CFrame::OnPlayRecording(wxCommandEvent& WXUNUSED (event))
|
||||||
|
|
||||||
void CFrame::OnPlay(wxCommandEvent& WXUNUSED (event))
|
void CFrame::OnPlay(wxCommandEvent& WXUNUSED (event))
|
||||||
{
|
{
|
||||||
|
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
||||||
|
{
|
||||||
|
if (UseDebugger)
|
||||||
|
{
|
||||||
|
if (CCPU::IsStepping())
|
||||||
|
CCPU::EnableStepping(false);
|
||||||
|
else
|
||||||
|
CCPU::EnableStepping(true); // Break
|
||||||
|
|
||||||
|
wxThread::Sleep(20);
|
||||||
|
g_pCodeWindow->JumpToAddress(PC);
|
||||||
|
g_pCodeWindow->Update();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (Core::GetState() == Core::CORE_RUN)
|
||||||
|
Core::SetState(Core::CORE_PAUSE);
|
||||||
|
else
|
||||||
|
Core::SetState(Core::CORE_RUN);
|
||||||
|
}
|
||||||
|
|
||||||
|
UpdateGUI();
|
||||||
|
}
|
||||||
|
|
||||||
BootGame();
|
BootGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,8 +77,13 @@ bool operator < (const GameListItem &one, const GameListItem &other)
|
||||||
switch(currentColumn)
|
switch(currentColumn)
|
||||||
{
|
{
|
||||||
case CGameListCtrl::COLUMN_TITLE: return strcasecmp(one.GetName(indexOne).c_str(), other.GetName(indexOther).c_str()) < 0;
|
case CGameListCtrl::COLUMN_TITLE: return strcasecmp(one.GetName(indexOne).c_str(), other.GetName(indexOther).c_str()) < 0;
|
||||||
case CGameListCtrl::COLUMN_COMPANY: return strcasecmp(one.GetCompany().c_str(), other.GetCompany().c_str()) < 0;
|
case CGameListCtrl::COLUMN_NOTES:
|
||||||
case CGameListCtrl::COLUMN_NOTES: return strcasecmp(one.GetDescription(indexOne).c_str(), other.GetDescription(indexOther).c_str()) < 0;
|
{
|
||||||
|
// On Gamecube we show the company string, while it's empty on other platforms, so we show the description instead
|
||||||
|
std::string cmp1 = (one.GetPlatform() == GameListItem::GAMECUBE_DISC) ? one.GetCompany() : one.GetDescription(indexOne);
|
||||||
|
std::string cmp2 = (other.GetPlatform() == GameListItem::GAMECUBE_DISC) ? other.GetCompany() : other.GetDescription(indexOther);
|
||||||
|
return strcasecmp(cmp1.c_str(), cmp2.c_str()) < 0;
|
||||||
|
}
|
||||||
case CGameListCtrl::COLUMN_COUNTRY: return (one.GetCountry() < other.GetCountry());
|
case CGameListCtrl::COLUMN_COUNTRY: return (one.GetCountry() < other.GetCountry());
|
||||||
case CGameListCtrl::COLUMN_SIZE: return (one.GetFileSize() < other.GetFileSize());
|
case CGameListCtrl::COLUMN_SIZE: return (one.GetFileSize() < other.GetFileSize());
|
||||||
case CGameListCtrl::COLUMN_PLATFORM: return (one.GetPlatform() < other.GetPlatform());
|
case CGameListCtrl::COLUMN_PLATFORM: return (one.GetPlatform() < other.GetPlatform());
|
||||||
|
@ -227,8 +232,10 @@ void CGameListCtrl::Update()
|
||||||
InsertColumn(COLUMN_PLATFORM, _(""));
|
InsertColumn(COLUMN_PLATFORM, _(""));
|
||||||
InsertColumn(COLUMN_BANNER, _("Banner"));
|
InsertColumn(COLUMN_BANNER, _("Banner"));
|
||||||
InsertColumn(COLUMN_TITLE, _("Title"));
|
InsertColumn(COLUMN_TITLE, _("Title"));
|
||||||
InsertColumn(COLUMN_COMPANY, _("Company"));
|
|
||||||
InsertColumn(COLUMN_NOTES, _("Notes"));
|
// Instead of showing the notes + the company, which is unknown with wii titles
|
||||||
|
// We show in the same column : company for GC games and description for wii/wad games
|
||||||
|
InsertColumn(COLUMN_NOTES, _(" "));
|
||||||
InsertColumn(COLUMN_COUNTRY, _(""));
|
InsertColumn(COLUMN_COUNTRY, _(""));
|
||||||
InsertColumn(COLUMN_SIZE, _("Size"));
|
InsertColumn(COLUMN_SIZE, _("Size"));
|
||||||
InsertColumn(COLUMN_EMULATION_STATE, _("State"));
|
InsertColumn(COLUMN_EMULATION_STATE, _("State"));
|
||||||
|
@ -238,8 +245,7 @@ void CGameListCtrl::Update()
|
||||||
SetColumnWidth(COLUMN_PLATFORM, 35);
|
SetColumnWidth(COLUMN_PLATFORM, 35);
|
||||||
SetColumnWidth(COLUMN_BANNER, 96);
|
SetColumnWidth(COLUMN_BANNER, 96);
|
||||||
SetColumnWidth(COLUMN_TITLE, 150);
|
SetColumnWidth(COLUMN_TITLE, 150);
|
||||||
SetColumnWidth(COLUMN_COMPANY, 130);
|
SetColumnWidth(COLUMN_NOTES, 130);
|
||||||
SetColumnWidth(COLUMN_NOTES, 150);
|
|
||||||
SetColumnWidth(COLUMN_COUNTRY, 32);
|
SetColumnWidth(COLUMN_COUNTRY, 32);
|
||||||
SetColumnWidth(COLUMN_EMULATION_STATE, 50);
|
SetColumnWidth(COLUMN_EMULATION_STATE, 50);
|
||||||
|
|
||||||
|
@ -325,66 +331,72 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
|
||||||
// title: 0xFF0000
|
// title: 0xFF0000
|
||||||
// company: 0x007030
|
// company: 0x007030
|
||||||
|
|
||||||
wxString name, description;
|
|
||||||
GameListItem& rISOFile = m_ISOFiles[_Index];
|
|
||||||
m_gamePath.append(std::string(rISOFile.GetFileName()) + '\n');
|
|
||||||
|
|
||||||
int ImageIndex = -1;
|
int ImageIndex = -1;
|
||||||
if (rISOFile.GetImage().IsOk())
|
wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS));
|
||||||
ImageIndex = m_imageListSmall->Add(rISOFile.GetImage());
|
GameListItem& rISOFile = m_ISOFiles[_Index];
|
||||||
|
|
||||||
// Insert a row with the platform image, that will be used as the Index
|
// Insert a row with the platform image, that will be used as the Index
|
||||||
long ItemIndex = InsertItem(_Index, wxEmptyString, m_PlatformImageIndex[rISOFile.GetPlatform()]);
|
long ItemIndex = InsertItem(_Index, wxEmptyString, m_PlatformImageIndex[rISOFile.GetPlatform()]);
|
||||||
|
|
||||||
|
if (rISOFile.GetImage().IsOk())
|
||||||
|
ImageIndex = m_imageListSmall->Add(rISOFile.GetImage());
|
||||||
|
|
||||||
// Set the game's banner in the second column
|
// Set the game's banner in the second column
|
||||||
SetItemColumnImage(_Index, COLUMN_BANNER, ImageIndex);
|
SetItemColumnImage(_Index, COLUMN_BANNER, ImageIndex);
|
||||||
|
|
||||||
switch (rISOFile.GetCountry())
|
if (rISOFile.GetPlatform() != GameListItem::WII_WAD)
|
||||||
{
|
{
|
||||||
case DiscIO::IVolume::COUNTRY_TAIWAN:
|
std::string company;
|
||||||
case DiscIO::IVolume::COUNTRY_JAPAN:
|
m_gamePath.append(rISOFile.GetFileName() + '\n');
|
||||||
// keep these codes, when we move to wx unicode...
|
|
||||||
//wxCSConv convFrom(wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS));
|
|
||||||
//wxCSConv convTo(wxFontMapper::GetEncodingName(wxFONTENCODING_DEFAULT));
|
|
||||||
//SetItem(_Index, COLUMN_TITLE, wxString(wxString(rISOFile.GetName()).wc_str(convFrom) , convTo), -1);
|
|
||||||
//SetItem(_Index, COLUMN_NOTES, wxString(wxString(rISOFile.GetDescription()).wc_str(convFrom) , convTo), -1);
|
|
||||||
|
|
||||||
if (WxUtils::CopySJISToString(name, rISOFile.GetName(0).c_str()))
|
// We show the company string on Gamecube only
|
||||||
SetItem(_Index, COLUMN_TITLE, name, -1);
|
// On Wii we show the description instead as the company string is empty
|
||||||
if (WxUtils::CopySJISToString(description, rISOFile.GetDescription(0).c_str()))
|
if (rISOFile.GetPlatform() == GameListItem::GAMECUBE_DISC)
|
||||||
SetItem(_Index, COLUMN_NOTES, description, -1);
|
company = rISOFile.GetCompany().c_str();
|
||||||
m_gameList.append(StringFromFormat("%s (J)\n", (const char*)name.mb_str(wxConvUTF8)));
|
|
||||||
break;
|
switch (rISOFile.GetCountry())
|
||||||
case DiscIO::IVolume::COUNTRY_USA:
|
{
|
||||||
if (WxUtils::CopySJISToString(name, rISOFile.GetName(0).c_str()))
|
case DiscIO::IVolume::COUNTRY_TAIWAN:
|
||||||
SetItem(_Index, COLUMN_TITLE, name, -1);
|
case DiscIO::IVolume::COUNTRY_JAPAN:
|
||||||
if (WxUtils::CopySJISToString(description, rISOFile.GetDescription(0).c_str()))
|
{
|
||||||
SetItem(_Index, COLUMN_NOTES, description, -1);
|
wxString name = wxString(rISOFile.GetName(0).c_str(), SJISConv);
|
||||||
m_gameList.append(StringFromFormat("%s (U)\n", (const char*)name.mb_str(wxConvUTF8)));
|
m_gameList.append(StringFromFormat("%s (J)\n", (const char*)name.mb_str()));
|
||||||
break;
|
SetItem(_Index, COLUMN_TITLE, name, -1);
|
||||||
default:
|
SetItem(_Index, COLUMN_NOTES, wxString(company.size() ? company.c_str() : rISOFile.GetDescription(0).c_str(), SJISConv), -1);
|
||||||
m_gameList.append(StringFromFormat("%s (E)\n", rISOFile.GetName((int)SConfig::GetInstance().m_InterfaceLanguage).c_str()));
|
}
|
||||||
SetItem(_Index, COLUMN_TITLE,
|
break;
|
||||||
wxString::From8BitData(rISOFile.GetName((int)SConfig::GetInstance().m_InterfaceLanguage).c_str()), -1);
|
case DiscIO::IVolume::COUNTRY_USA:
|
||||||
SetItem(_Index, COLUMN_NOTES,
|
m_gameList.append(StringFromFormat("%s (U)\n", rISOFile.GetName(0).c_str()));
|
||||||
wxString::From8BitData(rISOFile.GetDescription((int)SConfig::GetInstance().m_InterfaceLanguage).c_str()), -1);
|
SetItem(_Index, COLUMN_TITLE,
|
||||||
break;
|
wxString::From8BitData(rISOFile.GetName(0).c_str()), -1);
|
||||||
|
SetItem(_Index, COLUMN_NOTES,
|
||||||
|
wxString::From8BitData(company.size() ? company.c_str() : rISOFile.GetDescription(0).c_str()), -1);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
m_gameList.append(StringFromFormat("%s (E)\n", rISOFile.GetName((int)SConfig::GetInstance().m_InterfaceLanguage).c_str()));
|
||||||
|
SetItem(_Index, COLUMN_TITLE,
|
||||||
|
wxString::From8BitData(rISOFile.GetName((int)SConfig::GetInstance().m_InterfaceLanguage).c_str()), -1);
|
||||||
|
SetItem(_Index, COLUMN_NOTES, wxString::From8BitData(
|
||||||
|
company.size() ? company.c_str() : rISOFile.GetDescription((int)SConfig::GetInstance().m_InterfaceLanguage).c_str()), -1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // It's a Wad file
|
||||||
|
{
|
||||||
|
SetItem(_Index, COLUMN_TITLE, wxString(rISOFile.GetName(0).c_str(), SJISConv), -1);
|
||||||
|
SetItem(_Index, COLUMN_NOTES, wxString(rISOFile.GetDescription(0).c_str(), SJISConv), -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetItem(_Index, COLUMN_COMPANY, wxString::From8BitData(rISOFile.GetCompany().c_str()), -1);
|
|
||||||
SetItem(_Index, COLUMN_SIZE, NiceSizeFormat(rISOFile.GetFileSize()), -1);
|
|
||||||
|
|
||||||
// Load the INI file for columns that read from it
|
// Load the INI file for columns that read from it
|
||||||
IniFile ini;
|
IniFile ini;
|
||||||
std::string GameIni = FULL_GAMECONFIG_DIR + (rISOFile.GetUniqueID()) + ".ini";
|
ini.Load(std::string(FULL_GAMECONFIG_DIR + (rISOFile.GetUniqueID()) + ".ini").c_str());
|
||||||
ini.Load(GameIni.c_str());
|
|
||||||
|
|
||||||
// Emulation status
|
// Emulation status
|
||||||
int nState;
|
int nState;
|
||||||
|
|
||||||
ini.Get("EmuState", "EmulationStateId", &nState);
|
ini.Get("EmuState", "EmulationStateId", &nState);
|
||||||
|
|
||||||
// Emulation state
|
// File size + Emulation state
|
||||||
|
SetItem(_Index, COLUMN_SIZE, NiceSizeFormat(rISOFile.GetFileSize()), -1);
|
||||||
SetItemColumnImage(_Index, COLUMN_EMULATION_STATE, m_EmuStateImageIndex[nState]);
|
SetItemColumnImage(_Index, COLUMN_EMULATION_STATE, m_EmuStateImageIndex[nState]);
|
||||||
|
|
||||||
// Country
|
// Country
|
||||||
|
@ -557,8 +569,7 @@ void CGameListCtrl::ScanForISOs()
|
||||||
|
|
||||||
void CGameListCtrl::OnColBeginDrag(wxListEvent& event)
|
void CGameListCtrl::OnColBeginDrag(wxListEvent& event)
|
||||||
{
|
{
|
||||||
if (event.GetColumn() != COLUMN_TITLE && event.GetColumn() != COLUMN_COMPANY
|
if (event.GetColumn() != COLUMN_TITLE && event.GetColumn() != COLUMN_NOTES)
|
||||||
&& event.GetColumn() != COLUMN_NOTES)
|
|
||||||
event.Veto();
|
event.Veto();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -605,10 +616,12 @@ int wxCALLBACK wxListCompare(long item1, long item2, long sortData)
|
||||||
{
|
{
|
||||||
case CGameListCtrl::COLUMN_TITLE:
|
case CGameListCtrl::COLUMN_TITLE:
|
||||||
return strcasecmp(iso1->GetName(indexOne).c_str(),iso2->GetName(indexOther).c_str()) *t;
|
return strcasecmp(iso1->GetName(indexOne).c_str(),iso2->GetName(indexOther).c_str()) *t;
|
||||||
case CGameListCtrl::COLUMN_COMPANY:
|
|
||||||
return strcasecmp(iso1->GetCompany().c_str(),iso2->GetCompany().c_str()) *t;
|
|
||||||
case CGameListCtrl::COLUMN_NOTES:
|
case CGameListCtrl::COLUMN_NOTES:
|
||||||
return strcasecmp(iso1->GetDescription(indexOne).c_str(),iso2->GetDescription(indexOther).c_str()) *t;
|
{
|
||||||
|
std::string cmp1 = (iso1->GetPlatform() == GameListItem::GAMECUBE_DISC) ? iso1->GetCompany() : iso1->GetDescription(indexOne);
|
||||||
|
std::string cmp2 = (iso2->GetPlatform() == GameListItem::GAMECUBE_DISC) ? iso2->GetCompany() : iso2->GetDescription(indexOther);
|
||||||
|
return strcasecmp(cmp1.c_str(), cmp2.c_str()) *t;
|
||||||
|
}
|
||||||
case CGameListCtrl::COLUMN_COUNTRY:
|
case CGameListCtrl::COLUMN_COUNTRY:
|
||||||
if(iso1->GetCountry() > iso2->GetCountry()) return 1 *t;
|
if(iso1->GetCountry() > iso2->GetCountry()) return 1 *t;
|
||||||
if(iso1->GetCountry() < iso2->GetCountry()) return -1 *t;
|
if(iso1->GetCountry() < iso2->GetCountry()) return -1 *t;
|
||||||
|
@ -1144,16 +1157,13 @@ void CGameListCtrl::AutomaticColumnWidth()
|
||||||
if (0.66*resizable > 200)
|
if (0.66*resizable > 200)
|
||||||
{
|
{
|
||||||
SetColumnWidth(COLUMN_TITLE, 0.66*resizable);
|
SetColumnWidth(COLUMN_TITLE, 0.66*resizable);
|
||||||
SetColumnWidth(COLUMN_COMPANY, 0.34*resizable);
|
SetColumnWidth(COLUMN_NOTES, 0.34*resizable);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetColumnWidth(COLUMN_TITLE, resizable);
|
SetColumnWidth(COLUMN_TITLE, resizable);
|
||||||
SetColumnWidth(COLUMN_COMPANY, 0);
|
SetColumnWidth(COLUMN_NOTES, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We currently always hide the notes column
|
|
||||||
SetColumnWidth(COLUMN_NOTES, 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,6 @@ public:
|
||||||
COLUMN_PLATFORM = 0,
|
COLUMN_PLATFORM = 0,
|
||||||
COLUMN_BANNER,
|
COLUMN_BANNER,
|
||||||
COLUMN_TITLE,
|
COLUMN_TITLE,
|
||||||
COLUMN_COMPANY,
|
|
||||||
COLUMN_NOTES,
|
COLUMN_NOTES,
|
||||||
COLUMN_COUNTRY,
|
COLUMN_COUNTRY,
|
||||||
COLUMN_SIZE,
|
COLUMN_SIZE,
|
||||||
|
|
|
@ -174,7 +174,6 @@ enum
|
||||||
// Debugger Toolbar
|
// Debugger Toolbar
|
||||||
// --------------------
|
// --------------------
|
||||||
ID_TOOLBAR_DEBUG,
|
ID_TOOLBAR_DEBUG,
|
||||||
IDM_DEBUG_GO,
|
|
||||||
IDM_STEP,
|
IDM_STEP,
|
||||||
IDM_STEPOVER,
|
IDM_STEPOVER,
|
||||||
IDM_SKIP,
|
IDM_SKIP,
|
||||||
|
|
|
@ -74,7 +74,7 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
|
||||||
OpenISO = DiscIO::CreateVolumeFromFilename(fileName);
|
OpenISO = DiscIO::CreateVolumeFromFilename(fileName);
|
||||||
if (DiscIO::IsVolumeWiiDisc(OpenISO))
|
if (DiscIO::IsVolumeWiiDisc(OpenISO))
|
||||||
{
|
{
|
||||||
for (u32 i = 0; i < 0xFFFFFFFF; i++) // yes, technically there can be that many partitions...
|
for (u32 i = 0; i < 0xFFFFFFFF; i++) // yes, technically there can be OVER NINE THOUSAND partitions...
|
||||||
{
|
{
|
||||||
WiiPartition temp;
|
WiiPartition temp;
|
||||||
if ((temp.Partition = DiscIO::CreateVolumeFromFilename(fileName, 0, i)) != NULL)
|
if ((temp.Partition = DiscIO::CreateVolumeFromFilename(fileName, 0, i)) != NULL)
|
||||||
|
@ -140,15 +140,21 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
|
||||||
break;
|
break;
|
||||||
case DiscIO::IVolume::COUNTRY_USA:
|
case DiscIO::IVolume::COUNTRY_USA:
|
||||||
m_Country->SetValue(wxT("USA"));
|
m_Country->SetValue(wxT("USA"));
|
||||||
|
m_Lang->SetSelection(0);
|
||||||
|
m_Lang->Disable(); // For NTSC Games, there's no multi lang
|
||||||
break;
|
break;
|
||||||
case DiscIO::IVolume::COUNTRY_JAPAN:
|
case DiscIO::IVolume::COUNTRY_JAPAN:
|
||||||
m_Country->SetValue(wxT("JAPAN"));
|
m_Country->SetValue(wxT("JAPAN"));
|
||||||
|
m_Lang->SetSelection(-1);
|
||||||
|
m_Lang->Disable(); // For NTSC Games, there's no multi lang
|
||||||
break;
|
break;
|
||||||
case DiscIO::IVolume::COUNTRY_KOREA:
|
case DiscIO::IVolume::COUNTRY_KOREA:
|
||||||
m_Country->SetValue(wxT("KOREA"));
|
m_Country->SetValue(wxT("KOREA"));
|
||||||
break;
|
break;
|
||||||
case DiscIO::IVolume::COUNTRY_TAIWAN:
|
case DiscIO::IVolume::COUNTRY_TAIWAN:
|
||||||
m_Country->SetValue(wxT("TAIWAN"));
|
m_Country->SetValue(wxT("TAIWAN"));
|
||||||
|
m_Lang->SetSelection(-1);
|
||||||
|
m_Lang->Disable(); // For NTSC Games, there's no multi lang
|
||||||
break;
|
break;
|
||||||
case DiscIO::IVolume::COUNTRY_SDK:
|
case DiscIO::IVolume::COUNTRY_SDK:
|
||||||
m_Country->SetValue(wxT("No Country (SDK)"));
|
m_Country->SetValue(wxT("No Country (SDK)"));
|
||||||
|
@ -157,13 +163,12 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
|
||||||
m_Country->SetValue(wxT("UNKNOWN"));
|
m_Country->SetValue(wxT("UNKNOWN"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
wxString temp;
|
wxString temp = _T("0x") + wxString::FromAscii(OpenISO->GetMakerID().c_str());
|
||||||
temp = _T("0x") + wxString::FromAscii(OpenISO->GetMakerID().c_str());
|
|
||||||
m_MakerID->SetValue(temp);
|
m_MakerID->SetValue(temp);
|
||||||
m_Date->SetValue(wxString::FromAscii(OpenISO->GetApploaderDate().c_str()));
|
m_Date->SetValue(wxString::FromAscii(OpenISO->GetApploaderDate().c_str()));
|
||||||
m_FST->SetValue(wxString::Format(_T("%u"), OpenISO->GetFSTSize()));
|
m_FST->SetValue(wxString::Format(_T("%u"), OpenISO->GetFSTSize()));
|
||||||
|
|
||||||
// Banner
|
// Here we set all the info to be shown (be it SJIS or Ascii) + we set the window title
|
||||||
ChangeBannerDetails((int)SConfig::GetInstance().m_InterfaceLanguage);
|
ChangeBannerDetails((int)SConfig::GetInstance().m_InterfaceLanguage);
|
||||||
m_Banner->SetBitmap(OpenGameListItem->GetImage());
|
m_Banner->SetBitmap(OpenGameListItem->GetImage());
|
||||||
m_Banner->Connect(wxID_ANY, wxEVT_RIGHT_DOWN,
|
m_Banner->Connect(wxID_ANY, wxEVT_RIGHT_DOWN,
|
||||||
|
@ -190,17 +195,6 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_Treectrl->Expand(RootId);
|
m_Treectrl->Expand(RootId);
|
||||||
|
|
||||||
std::string filename, extension;
|
|
||||||
SplitPath(fileName, 0, &filename, &extension);
|
|
||||||
|
|
||||||
// hyperiris: temp fix, need real work
|
|
||||||
wxString name;
|
|
||||||
WxUtils::CopySJISToString(name, OpenGameListItem->GetName(0).c_str());
|
|
||||||
|
|
||||||
SetTitle(wxString::Format(wxT("%s%s"),
|
|
||||||
wxString::FromAscii(StringFromFormat("%s%s: %s - ", filename.c_str(), extension.c_str(), OpenGameListItem->GetUniqueID().c_str()).c_str()).c_str(),
|
|
||||||
name.c_str()).c_str());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CISOProperties::~CISOProperties()
|
CISOProperties::~CISOProperties()
|
||||||
|
@ -1139,13 +1133,39 @@ void CISOProperties::OnChangeBannerLang(wxCommandEvent& event)
|
||||||
|
|
||||||
void CISOProperties::ChangeBannerDetails(int lang)
|
void CISOProperties::ChangeBannerDetails(int lang)
|
||||||
{
|
{
|
||||||
wxString name,
|
if (OpenGameListItem->GetCountry() == DiscIO::IVolume::COUNTRY_JAPAN
|
||||||
description;
|
|| OpenGameListItem->GetCountry() == DiscIO::IVolume::COUNTRY_TAIWAN
|
||||||
|
|| OpenGameListItem->GetPlatform() == GameListItem::WII_WAD)
|
||||||
|
{
|
||||||
|
wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS));
|
||||||
|
wxString name = wxString(OpenGameListItem->GetName(0).c_str(), SJISConv);
|
||||||
|
|
||||||
WxUtils::CopySJISToString(name, OpenGameListItem->GetName(lang).c_str());
|
// Updates the informations shown in the window
|
||||||
WxUtils::CopySJISToString(description, OpenGameListItem->GetDescription(lang).c_str());
|
m_ShortName->SetValue(name);
|
||||||
|
m_Comment->SetValue(wxString(OpenGameListItem->GetDescription(0).c_str(), SJISConv));
|
||||||
|
m_Maker->SetValue(wxString::FromAscii(OpenGameListItem->GetCompany().c_str()));//dev too
|
||||||
|
|
||||||
m_ShortName->SetValue(name);
|
std::string filename, extension;
|
||||||
m_Maker->SetValue(wxString::FromAscii(OpenGameListItem->GetCompany().c_str()));//dev too
|
SplitPath(OpenGameListItem->GetFileName(), 0, &filename, &extension);
|
||||||
m_Comment->SetValue(description);
|
|
||||||
|
// Also sets the window's title
|
||||||
|
SetTitle(wxString::Format(wxT("%s%s"),
|
||||||
|
wxString::FromAscii(StringFromFormat("%s%s: %s - ", filename.c_str(), extension.c_str(), OpenGameListItem->GetUniqueID().c_str()).c_str()).c_str(),
|
||||||
|
name.c_str()));
|
||||||
|
}
|
||||||
|
else // Do the same for PAL/US Games using Ascii
|
||||||
|
{
|
||||||
|
wxString name = wxString::FromAscii(OpenGameListItem->GetName(lang).c_str());
|
||||||
|
|
||||||
|
m_ShortName->SetValue(name);
|
||||||
|
m_Comment->SetValue(wxString::FromAscii(OpenGameListItem->GetDescription(lang).c_str()));
|
||||||
|
m_Maker->SetValue(wxString::FromAscii(OpenGameListItem->GetCompany().c_str()));//dev too
|
||||||
|
|
||||||
|
std::string filename, extension;
|
||||||
|
SplitPath(OpenGameListItem->GetFileName(), 0, &filename, &extension);
|
||||||
|
|
||||||
|
SetTitle(wxString::Format(wxT("%s%s"),
|
||||||
|
wxString::FromAscii(StringFromFormat("%s%s: %s - ", filename.c_str(), extension.c_str(), OpenGameListItem->GetUniqueID().c_str()).c_str()).c_str(),
|
||||||
|
name.c_str()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,11 +23,11 @@
|
||||||
#include <wx/filepicker.h>
|
#include <wx/filepicker.h>
|
||||||
#include <wx/statbmp.h>
|
#include <wx/statbmp.h>
|
||||||
#include <wx/imaglist.h>
|
#include <wx/imaglist.h>
|
||||||
|
#include <wx/fontmap.h>
|
||||||
#include <wx/treectrl.h>
|
#include <wx/treectrl.h>
|
||||||
#include <wx/gbsizer.h>
|
#include <wx/gbsizer.h>
|
||||||
#include <wx/notebook.h>
|
#include <wx/notebook.h>
|
||||||
#include <wx/mimetype.h>
|
#include <wx/mimetype.h>
|
||||||
#include "WxUtils.h"
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "ISOFile.h"
|
#include "ISOFile.h"
|
||||||
|
|
|
@ -44,7 +44,7 @@ BEGIN_EVENT_TABLE(CLogWindow, wxPanel)
|
||||||
EVT_TIMER(IDTM_UPDATELOG, CLogWindow::OnLogTimer)
|
EVT_TIMER(IDTM_UPDATELOG, CLogWindow::OnLogTimer)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
CLogWindow::CLogWindow(CFrame *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
|
CLogWindow::CLogWindow(CFrame *parent, wxWindowID id, const wxString &, const wxPoint &position, const wxSize& size, long style)
|
||||||
: wxPanel(parent, id, position, size, style)
|
: wxPanel(parent, id, position, size, style)
|
||||||
, Parent(parent), m_LogSection(1), m_Log(NULL), m_cmdline(NULL), m_FontChoice(NULL)
|
, Parent(parent), m_LogSection(1), m_Log(NULL), m_cmdline(NULL), m_FontChoice(NULL)
|
||||||
, m_LogAccess(true)
|
, m_LogAccess(true)
|
||||||
|
|
Loading…
Reference in New Issue