System Information(InfoWindow.cpp) - Added a method to check what Windows OS you are running(I do not know of a method to check what linux OS someone is using)
             and also added a extended version of the cpu_summarize.
Plugin manager - Temporarily fixed a problem that caused a crashing when pressing Stop reported in Issue 1656

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4561 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
death2droid 2009-11-14 08:53:16 +00:00
parent de9991c30d
commit 2667a469fb
5 changed files with 89 additions and 5 deletions

View File

@ -201,3 +201,23 @@ std::string CPUInfo::Summarize()
if (bLongMode) sum += ", 64-bit support";
return sum;
}
// Turn the cpu info into a string we can show(This version uses headings and line breaks)
std::string CPUInfo::Summarize_long()
{
std::string sum;
sum = StringFromFormat("CPU Brand: %s\n",cpu_string);
sum += StringFromFormat("Number of cores: %i \n ",num_cores);
sum+= "Supported instruction sets:\n";
if (bSSE) sum += " -SSE\n";
if (bSSE2) sum += " -SSE2\n";
if (bSSE3) sum += " -SSE3\n";
if (bSSSE3) sum += " -SSSE3\n";
if (bSSE4_1) sum += " -SSE4.1\n";
if (bSSE4_2) sum += " -SSE4.2\n";
if (bLongMode) sum += "64-bit supported";
return sum;
}

View File

@ -58,6 +58,9 @@ struct CPUInfo
// Turn the cpu info into a string we can show
std::string Summarize();
// Turn the cpu info into a string we can show(This version uses headings and line breaks)
std::string Summarize_long();
};
extern CPUInfo cpu_info;

View File

@ -164,7 +164,7 @@ void CPluginManager::ShutdownPlugins()
if (m_pad[i])
{
m_pad[i]->Shutdown();
delete m_pad[i];
//delete m_pad[i]; Causes crash on stop
}
m_pad[i] = NULL;
}
@ -301,7 +301,7 @@ void *CPluginManager::LoadPlugin(const char *_rFilename, int Number)
PanicAlert("Can't open %s, it has a missing function", _rFilename);
return NULL;
}
// Call the DLL function SetGlobals
plugin->SetGlobals(m_PluginGlobals);
return plugin;

View File

@ -57,7 +57,8 @@ void wxInfoWindow::Init_ChildControls()
Info.append(StringFromFormat(
"\n\n%s\n%s\n%s\n\n%s\n\n",
"\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(),
Summarize_Drives().c_str(),
Summarize_CPU().c_str(),
Summarize_Plug().c_str(),

View File

@ -18,6 +18,9 @@
#ifndef __SUMMARIZE_H__
#define __SUMMARIZE_H__
#include <windows.h>
#include <dos.h>
std::string Summarize_Plug()
{
return StringFromFormat(
@ -104,7 +107,7 @@ std::string Summarize_CPU()
{
return StringFromFormat(
"Processor Information: \n%s\n",
cpu_info.Summarize().c_str()
cpu_info.Summarize_long().c_str()
);
}
@ -124,4 +127,61 @@ std::string Summarize_Drives()
return drive;
}
#endif //__SUMMARIZE_H__
std::string Summarize_OS(void)
{
std::string operatingSystem = "Operating System: ";
#ifdef _WIN32
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
operatingSystem = std::string("Non Windows operating system");
#endif
return operatingSystem;
}
#endif //__SUMMARIZE_H__