revert to r4531, but keep the changes from the following revisions: 4533,4550-4551,4556-4559

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4566 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman
2009-11-14 17:08:32 +00:00
parent 18305c7c49
commit 06aa62504c
66 changed files with 2170 additions and 1570 deletions

View File

@ -116,8 +116,8 @@ void CARCodeAddEdit::SaveCheatData(wxCommandEvent& WXUNUSED (event))
if (pieces.size() == 2 && pieces[0].size() == 8 && pieces[1].size() == 8)
{
u32 addr = strtoul(pieces[0].c_str(), NULL, 16);
u32 value = strtoul(pieces[1].c_str(), NULL, 16);
u32 addr = strtol(pieces[0].c_str(), NULL, 16);
u32 value = strtol(pieces[1].c_str(), NULL, 16);
// Decrypted code
tempEntries.push_back(ActionReplay::AREntry(addr, value));
}

View File

@ -145,11 +145,11 @@ int abc = 0;
switch(wParam)
{
// Stop
case WM_USER_STOP:
case OPENGL_WM_USER_STOP:
main_frame->DoStop();
return 0;
case WM_USER_CREATE:
case OPENGL_WM_USER_CREATE:
// We don't have a local setting for bRenderToMain but we can detect it this way instead
//PanicAlert("main call %i %i %i %i", lParam, (HWND)Core::GetWindowHandle(), MSWGetParent_((HWND)Core::GetWindowHandle()), (HWND)this->GetHWND());
if (lParam == NULL)
@ -232,7 +232,6 @@ EVT_MENU(IDM_BROWSE, CFrame::OnBrowse)
EVT_MENU(IDM_MEMCARD, CFrame::OnMemcard)
EVT_MENU(IDM_CHEATS, CFrame::OnShow_CheatsWindow)
EVT_MENU(IDM_INFO, CFrame::OnShow_InfoWindow)
EVT_MENU(IDM_RESTART, CFrame::OnRestart)
EVT_MENU(IDM_CHANGEDISC, CFrame::OnChangeDisc)
EVT_MENU(IDM_LOAD_WII_MENU, CFrame::OnLoadWiiMenu)
EVT_MENU(IDM_TOGGLE_FULLSCREEN, CFrame::OnToggleFullscreen)
@ -304,7 +303,7 @@ CFrame::CFrame(wxFrame* parent,
, m_ToolBar(NULL), m_ToolBarDebug(NULL), m_ToolBarAui(NULL)
, m_pStatusBar(NULL), m_GameListCtrl(NULL), m_Panel(NULL)
, UseDebugger(_UseDebugger), m_bEdit(false), m_bTabSplit(false), m_bNoDocking(false)
, bRenderToMain(false), bFloatLogWindow(false), bFloatConsoleWindow(false)
, bRenderToMain(true), bFloatLogWindow(false), bFloatConsoleWindow(false)
, HaveLeds(false), HaveSpeakers(false)
, m_fLastClickTime(0), m_iLastMotionTime(0), LastMouseX(0), LastMouseY(0)
#if wxUSE_TIMER
@ -495,24 +494,6 @@ void CFrame::OnQuit(wxCommandEvent& WXUNUSED (event))
Close(true);
}
void CFrame::OnRestart(wxCommandEvent& WXUNUSED (event))
{
if (Core::GetState() != Core::CORE_UNINITIALIZED)
{
wxMessageBox(wxT("Please stop the current game before restarting."), wxT("Notice"), wxOK, this);
return;
}
// Get exe path and restart
#ifdef _WIN32
char Str[MAX_PATH + 1];
DWORD Size = sizeof(Str)/sizeof(char);
DWORD n = GetModuleFileNameA(NULL, Str, Size);
ShellExecuteA(NULL, "open", Str, g_pCodeWindow ? "" : "-d", NULL, SW_SHOW);
#endif
Close(true);
}
// --------
// Events
@ -691,7 +672,7 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
#ifdef _WIN32
if(event.GetKeyCode() == 'M', '3', '4', '5', '6', '7') // Send this to the video plugin WndProc
{
PostMessage((HWND)Core::GetWindowHandle(), WM_USER, WM_USER_KEYDOWN, event.GetKeyCode());
PostMessage((HWND)Core::GetWindowHandle(), WM_USER, OPENGL_WM_USER_KEYDOWN, event.GetKeyCode());
}
#endif

View File

@ -250,7 +250,6 @@ class CFrame : public wxFrame
#endif
// Event functions
void OnQuit(wxCommandEvent& event);
void OnRestart(wxCommandEvent& WXUNUSED (event));
void OnHelp(wxCommandEvent& event);
void OnToolBar(wxCommandEvent& event);
void OnAuiToolBar(wxAuiToolBarEvent& event);

View File

@ -127,12 +127,6 @@ void CFrame::ToggleConsole(bool bShow, int i)
#ifdef _WIN32
ConsoleListener *Console = LogManager::GetInstance()->getConsoleListener();
// For developers: Use this to get a regular separate console window
/*
if(!GetConsoleWindow()) Console->Open(); else ShowWindow(GetConsoleWindow(), SW_SHOW);
return;
*/
if (bShow)
{
//Console->Log(LogTypes::LNOTICE, StringFromFormat(" >>> Show\n").c_str());
@ -754,7 +748,7 @@ void CFrame::ResizeConsole()
wxBorder = 2;
Border = 4;
LowerBorder = 6;
MenuBar = 26; // Including upper border
MenuBar = 30; // Including upper border
ScrollBar = 19;
}
else // XP

View File

@ -121,8 +121,6 @@ void CFrame::CreateMenu()
fileMenu->AppendSeparator();
fileMenu->Append(IDM_BROWSE, _T("&Browse for ISOs..."));
fileMenu->AppendSeparator();
fileMenu->Append(IDM_RESTART, g_pCodeWindow ? _T("Restart in regular mode") : _T("Restart in debugging mode"));
fileMenu->AppendSeparator();
fileMenu->Append(wxID_EXIT, _T("E&xit\tAlt+F4"));
m_MenuBar->Append(fileMenu, _T("&File"));

View File

@ -57,8 +57,7 @@ void wxInfoWindow::Init_ChildControls()
Info.append(StringFromFormat(
"\n\n_-Computer Information-_\n\n%s\n%s\n%s\n\n_-Dolphin Information-_\n\n%s\n\n%s\n\n",
Summarize_OS().c_str(),
"\n\n%s\n%s\n%s\n\n%s\n\n",
Summarize_Drives().c_str(),
Summarize_CPU().c_str(),
Summarize_Plug().c_str(),

View File

@ -234,7 +234,7 @@ void CLogWindow::OnClear(wxCommandEvent& WXUNUSED (event))
for (int i = 0; i < msgQueueSize; i++)
msgQueue.pop();
m_LogSection.Leave();
m_console->ClearScreen();
NOTICE_LOG(CONSOLE, "Console cleared");
NotifyUpdate();
@ -517,12 +517,11 @@ void CLogWindow::UpdateLog()
m_LogTimer->Start(UPDATETIME);
}
// Receive log messages
void CLogWindow::Log(LogTypes::LOG_LEVELS level, const char *text)
{
m_LogSection.Enter();
// Remove the first message if the queue is big
//if (msgQueue.size() >= 200) msgQueue.pop();
if (msgQueue.size() >= 100)
msgQueue.pop();
msgQueue.push(std::pair<u8, wxString>((u8)level, wxString::FromAscii(text)));
m_LogSection.Leave();
}

View File

@ -18,8 +18,6 @@
#ifndef __SUMMARIZE_H__
#define __SUMMARIZE_H__
#include <windows.h>
std::string Summarize_Plug()
{
return StringFromFormat(
@ -106,7 +104,7 @@ std::string Summarize_CPU()
{
return StringFromFormat(
"Processor Information: \n%s\n",
cpu_info.Summarize_long().c_str()
cpu_info.Summarize().c_str()
);
}
@ -126,66 +124,4 @@ std::string Summarize_Drives()
return drive;
}
std::string Summarize_OS(void)
{
std::string operatingSystem;
#ifdef _WIN32
#include <windows.h>
OSVERSIONINFO osver;
osver.dwOSVersionInfoSize = sizeof(osver);
if (GetVersionEx(&osver))
{
switch(osver.dwMajorVersion)
{
case 6:
switch(osver.dwMinorVersion)
{
case 1:
if(osver.dwPlatformId == VER_NT_WORKSTATION)
operatingSystem = "Windows 7";
else
operatingSystem += "Windows Server 2008 R2";
break;
case 0:
if(osver.dwPlatformId == VER_NT_WORKSTATION)
operatingSystem = "Windows Vista";
else
operatingSystem = "Windows Server 2008";
break;
}
break;
case 5:
switch(osver.dwMinorVersion)
{
case 2:
if(GetSystemMetrics(SM_SERVERR2) != 0)
operatingSystem = "Windows Server 2003 R2";
else
operatingSystem = "Windows Server 2003";
break;
case 1:
operatingSystem = "Windows XP";
break;
case 0:
operatingSystem = "Windows 2000";
break;
}
break;
}
}
#else
#ifdef __linux__
#include "linux/version.h"
operatingSystem = UTS_RELEASE;
#endif
#endif
return StringFromFormat("Operating System: %s",operatingSystem);
}
#endif //__SUMMARIZE_H__
#endif //__SUMMARIZE_H__