Clean up some of the commenting by JPeterson.
There is no point of using ////////////////////////////////////////////////////////////////////////////////////////// to show that a section has ended when there is already commenting showing that a new one has started. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4138 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
478ed4b11e
commit
14e9cf6d1f
|
@ -286,7 +286,7 @@ void ConsoleListener::Log(LogTypes::LOG_LEVELS Level, const char *Text)
|
||||||
Color = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE;
|
Color = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (Level != CUSTOM_LEVEL && strlen(Text) > 10)
|
if (strlen(Text) > 10)
|
||||||
{
|
{
|
||||||
// First 10 chars white
|
// First 10 chars white
|
||||||
SetConsoleTextAttribute(hConsole, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY);
|
SetConsoleTextAttribute(hConsole, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY);
|
||||||
|
|
|
@ -81,8 +81,7 @@ enum LOG_LEVELS {
|
||||||
LERROR = ERROR_LEVEL,
|
LERROR = ERROR_LEVEL,
|
||||||
LWARNING = WARNING_LEVEL,
|
LWARNING = WARNING_LEVEL,
|
||||||
LINFO = INFO_LEVEL,
|
LINFO = INFO_LEVEL,
|
||||||
LDEBUG = DEBUG_LEVEL,
|
LDEBUG = DEBUG_LEVEL
|
||||||
LCUSTOM = CUSTOM_LEVEL
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -16,23 +16,15 @@
|
||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
|
|
||||||
|
//CFrame is the main parent window. Inside CFrame there is an m_Panel that is the parent for
|
||||||
|
//the rendering window (when we render to the main window). In Windows the rendering window is
|
||||||
|
//created by giving CreateWindow() m_Panel->GetHandle() as parent window and creating a new
|
||||||
|
//child window to m_Panel. The new child window handle that is returned by CreateWindow() can
|
||||||
|
//be accessed from Core::GetWindowHandle().
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
// ----------
|
||||||
// Windows
|
// Includes
|
||||||
/* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
// ----------
|
||||||
|
|
||||||
CFrame is the main parent window. Inside CFrame there is an m_Panel that is the parent for
|
|
||||||
the rendering window (when we render to the main window). In Windows the rendering window is
|
|
||||||
created by giving CreateWindow() m_Panel->GetHandle() as parent window and creating a new
|
|
||||||
child window to m_Panel. The new child window handle that is returned by CreateWindow() can
|
|
||||||
be accessed from Core::GetWindowHandle().
|
|
||||||
|
|
||||||
///////////////////////////////////////////////*/
|
|
||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// includes
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#include "Common.h" // Common
|
#include "Common.h" // Common
|
||||||
#include "FileUtil.h"
|
#include "FileUtil.h"
|
||||||
|
@ -57,9 +49,9 @@ be accessed from Core::GetWindowHandle().
|
||||||
|
|
||||||
#include <wx/datetime.h> // wxWidgets
|
#include <wx/datetime.h> // wxWidgets
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------
|
||||||
// resources
|
// Resources
|
||||||
// ----------------------------------------------------------------------------
|
// -----------
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "../resources/Dolphin.c" // Dolphin icon
|
#include "../resources/Dolphin.c" // Dolphin icon
|
||||||
|
@ -82,10 +74,9 @@ extern "C" {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
//---------------
|
||||||
/* Windows functions. Setting the cursor with wxSetCursor() did not work in this instance.
|
// Windows functions. Setting the cursor with wxSetCursor() did not work in this instance.
|
||||||
Probably because it's somehow reset from the WndProc() in the child window */
|
// Probably because it's somehow reset from the WndProc() in the child window
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// Declare a blank icon and one that will be the normal cursor
|
// Declare a blank icon and one that will be the normal cursor
|
||||||
HCURSOR hCursor = NULL, hCursorBlank = NULL;
|
HCURSOR hCursor = NULL, hCursorBlank = NULL;
|
||||||
|
@ -113,13 +104,10 @@ HWND MSWGetParent_(HWND Parent)
|
||||||
return GetParent(Parent);
|
return GetParent(Parent);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
//---------------
|
||||||
|
//The CPanel class to receive MSWWindowProc messages from the video plugin.
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/* The CPanel class to receive MSWWindowProc messages from the video plugin. */
|
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
|
||||||
extern CFrame* main_frame;
|
extern CFrame* main_frame;
|
||||||
|
|
||||||
class CPanel : public wxPanel
|
class CPanel : public wxPanel
|
||||||
|
@ -213,13 +201,9 @@ int abc = 0;
|
||||||
return wxPanel::MSWWindowProc(nMsg, wParam, lParam);
|
return wxPanel::MSWWindowProc(nMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
//-----------------
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// event tables
|
// event tables
|
||||||
// ----------------------------
|
|
||||||
|
|
||||||
// Notice that wxID_HELP will be processed for the 'About' menu and the toolbar
|
// Notice that wxID_HELP will be processed for the 'About' menu and the toolbar
|
||||||
// help button.
|
// help button.
|
||||||
|
|
||||||
|
@ -311,12 +295,10 @@ EVT_AUINOTEBOOK_ALLOW_DND(wxID_ANY, CFrame::OnAllowNotebookDnD)
|
||||||
EVT_AUINOTEBOOK_PAGE_CHANGED(wxID_ANY, CFrame::OnNotebookPageChanged)
|
EVT_AUINOTEBOOK_PAGE_CHANGED(wxID_ANY, CFrame::OnNotebookPageChanged)
|
||||||
|
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
//---------------
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Creation and close, quit functions
|
// Creation and close, quit functions
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
|
||||||
CFrame::CFrame(bool showLogWindow,
|
CFrame::CFrame(bool showLogWindow,
|
||||||
wxFrame* parent,
|
wxFrame* parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
|
@ -372,9 +354,8 @@ CFrame::CFrame(bool showLogWindow,
|
||||||
// Give it a menu bar
|
// Give it a menu bar
|
||||||
CreateMenu();
|
CreateMenu();
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// ---------------
|
||||||
// Main panel
|
// Main panel
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯
|
|
||||||
// This panel is the parent for rendering and it holds the gamelistctrl
|
// This panel is the parent for rendering and it holds the gamelistctrl
|
||||||
m_Panel = new CPanel(this, IDM_MPANEL);
|
m_Panel = new CPanel(this, IDM_MPANEL);
|
||||||
|
|
||||||
|
@ -385,7 +366,7 @@ CFrame::CFrame(bool showLogWindow,
|
||||||
sizerPanel = new wxBoxSizer(wxHORIZONTAL);
|
sizerPanel = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sizerPanel->Add(m_GameListCtrl, 1, wxEXPAND | wxALL);
|
sizerPanel->Add(m_GameListCtrl, 1, wxEXPAND | wxALL);
|
||||||
m_Panel->SetSizer(sizerPanel);
|
m_Panel->SetSizer(sizerPanel);
|
||||||
// -------------------------------------------------------------------------
|
// ---------------
|
||||||
|
|
||||||
m_Mgr = new wxAuiManager();
|
m_Mgr = new wxAuiManager();
|
||||||
m_Mgr->SetManagedWindow(this);
|
m_Mgr->SetManagedWindow(this);
|
||||||
|
@ -554,12 +535,14 @@ void CFrame::DoFullscreen(bool _F)
|
||||||
m_Mgr->LoadPerspective(AuiCurrent, true);
|
m_Mgr->LoadPerspective(AuiCurrent, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int CFrame::Limit(int i, int Low, int High)
|
int CFrame::Limit(int i, int Low, int High)
|
||||||
{
|
{
|
||||||
if (i < Low) return Low;
|
if (i < Low) return Low;
|
||||||
if (i > High) return High;
|
if (i > High) return High;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::SetSimplePaneSize()
|
void CFrame::SetSimplePaneSize()
|
||||||
{
|
{
|
||||||
wxArrayInt Pane, Size;
|
wxArrayInt Pane, Size;
|
||||||
|
@ -584,6 +567,7 @@ void CFrame::SetSimplePaneSize()
|
||||||
m_Mgr->GetPane(wxString::Format(wxT("Pane %i"), Pane[i])).MinSize(-1, -1).MaxSize(-1, -1);
|
m_Mgr->GetPane(wxString::Format(wxT("Pane %i"), Pane[i])).MinSize(-1, -1).MaxSize(-1, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::SetPaneSize()
|
void CFrame::SetPaneSize()
|
||||||
{
|
{
|
||||||
if (Perspectives.size() <= ActivePerspective) return;
|
if (Perspectives.size() <= ActivePerspective) return;
|
||||||
|
@ -615,6 +599,7 @@ void CFrame::SetPaneSize()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Debugging, show loose windows
|
// Debugging, show loose windows
|
||||||
void CFrame::ListChildren()
|
void CFrame::ListChildren()
|
||||||
{
|
{
|
||||||
|
@ -682,6 +667,7 @@ void CFrame::ListChildren()
|
||||||
|
|
||||||
Console->Log(LogTypes::LCUSTOM, "--------------------------------------------------------------------\n");
|
Console->Log(LogTypes::LCUSTOM, "--------------------------------------------------------------------\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::ReloadPanes()
|
void CFrame::ReloadPanes()
|
||||||
{
|
{
|
||||||
// Keep settings
|
// Keep settings
|
||||||
|
@ -738,6 +724,7 @@ void CFrame::ReloadPanes()
|
||||||
//Console->Log(LogTypes::LNOTICE, StringFromFormat("ReloadPanes end: Sound %i\n", FindWindowByName(wxT("Sound"))).c_str());
|
//Console->Log(LogTypes::LNOTICE, StringFromFormat("ReloadPanes end: Sound %i\n", FindWindowByName(wxT("Sound"))).c_str());
|
||||||
//ListChildren();
|
//ListChildren();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::DoLoadPerspective()
|
void CFrame::DoLoadPerspective()
|
||||||
{
|
{
|
||||||
ReloadPanes();
|
ReloadPanes();
|
||||||
|
@ -746,13 +733,13 @@ void CFrame::DoLoadPerspective()
|
||||||
// Show
|
// Show
|
||||||
ShowAllNotebooks(true);
|
ShowAllNotebooks(true);
|
||||||
|
|
||||||
/* */
|
|
||||||
ConsoleListener* Console = LogManager::GetInstance()->getConsoleListener();
|
ConsoleListener* Console = LogManager::GetInstance()->getConsoleListener();
|
||||||
Console->Log(LogTypes::LCUSTOM, StringFromFormat(
|
Console->Log(LogTypes::LCUSTOM, StringFromFormat(
|
||||||
"Loaded: %s (%i panes, %i NBs)\n",
|
"Loaded: %s (%i panes, %i NBs)\n",
|
||||||
Perspectives.at(ActivePerspective).Name.c_str(), m_Mgr->GetAllPanes().GetCount(), GetNotebookCount()).c_str());
|
Perspectives.at(ActivePerspective).Name.c_str(), m_Mgr->GetAllPanes().GetCount(), GetNotebookCount()).c_str());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the local perspectives array
|
// Update the local perspectives array
|
||||||
void CFrame::SaveLocal()
|
void CFrame::SaveLocal()
|
||||||
{
|
{
|
||||||
|
@ -917,12 +904,10 @@ void CFrame::OnPaneClose(wxAuiManagerEvent& event)
|
||||||
|
|
||||||
m_Mgr->Update();
|
m_Mgr->Update();
|
||||||
}
|
}
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
//---------------
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Host messages
|
// Host messages
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
WXLRESULT CFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
WXLRESULT CFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||||
{
|
{
|
||||||
|
@ -980,12 +965,10 @@ void CFrame::PostUpdateUIEvent(wxUpdateUIEvent& event)
|
||||||
{
|
{
|
||||||
if (g_pCodeWindow) wxPostEvent(g_pCodeWindow, event);
|
if (g_pCodeWindow) wxPostEvent(g_pCodeWindow, event);
|
||||||
}
|
}
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
// ---------------
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Input
|
// Input
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
|
||||||
void CFrame::OnGameListCtrl_ItemActivated(wxListEvent& WXUNUSED (event))
|
void CFrame::OnGameListCtrl_ItemActivated(wxListEvent& WXUNUSED (event))
|
||||||
{
|
{
|
||||||
// Show all platforms and regions if...
|
// Show all platforms and regions if...
|
||||||
|
@ -1075,12 +1058,10 @@ void CFrame::OnKeyUp(wxKeyEvent& event)
|
||||||
CPluginManager::GetInstance().GetPad(0)->PAD_Input(event.GetKeyCode(), 0); // 0 = Up
|
CPluginManager::GetInstance().GetPad(0)->PAD_Input(event.GetKeyCode(), 0); // 0 = Up
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
// ---------------
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Detect double click. Kind of, for some reason we have to manually create the double click for now.
|
// Detect double click. Kind of, for some reason we have to manually create the double click for now.
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
|
||||||
void CFrame::OnDoubleClick(wxMouseEvent& event)
|
void CFrame::OnDoubleClick(wxMouseEvent& event)
|
||||||
{
|
{
|
||||||
// Don't block the mouse click
|
// Don't block the mouse click
|
||||||
|
@ -1126,7 +1107,7 @@ void CFrame::OnDoubleClick(wxMouseEvent& event)
|
||||||
|
|
||||||
|
|
||||||
// Check for mouse motion. Here we process the bHideCursor setting.
|
// Check for mouse motion. Here we process the bHideCursor setting.
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
|
||||||
void CFrame::OnMotion(wxMouseEvent& event)
|
void CFrame::OnMotion(wxMouseEvent& event)
|
||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
|
@ -1181,7 +1162,6 @@ void CFrame::OnMotion(wxMouseEvent& event)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for mouse status a couple of times per second for the auto hide option
|
// Check for mouse status a couple of times per second for the auto hide option
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
|
||||||
#if wxUSE_TIMER
|
#if wxUSE_TIMER
|
||||||
void CFrame::Update()
|
void CFrame::Update()
|
||||||
{
|
{
|
||||||
|
@ -1203,5 +1183,4 @@ void CFrame::Update()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (C) 2003 Dolphin Project.
|
// Copyright (C) 2003-2009 Dolphin Project.
|
||||||
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
|
Loading…
Reference in New Issue