Changed: #878 Fix typos in comments/code

This commit is contained in:
kervala 2010-06-14 13:57:43 +02:00
parent 02a6779adc
commit d3408356bb
3 changed files with 15 additions and 38 deletions

View file

@ -22,6 +22,8 @@
#include "client_configDlg.h" #include "client_configDlg.h"
#include "cfg_file.h" #include "cfg_file.h"
#include <nel/misc/system_utils.h>
using namespace NLMISC; using namespace NLMISC;
using namespace NL3D; using namespace NL3D;
@ -147,10 +149,10 @@ BOOL CClientConfigApp::InitInstance()
IDriver *glDriver = CDRU::createGlDriver(); IDriver *glDriver = CDRU::createGlDriver();
IDriver *d3dDriver = CDRU::createD3DDriver(); IDriver *d3dDriver = CDRU::createD3DDriver();
// Get some informations about the system // Get some information about the system
RegisterVideoModes (0, glDriver); RegisterVideoModes (0, glDriver);
RegisterVideoModes (1, d3dDriver); RegisterVideoModes (1, d3dDriver);
GetSystemInformations (d3dDriver); GetSystemInformation (d3dDriver);
// Load the config file // Load the config file
if (!LoadConfigFile ()) if (!LoadConfigFile ())
@ -257,35 +259,10 @@ CString GetString (uint res)
return str; return str;
} }
// ***************************************************************************
bool supportUnicode()
{
static bool init = false;
static bool unicodeSupported = false;
if (!init)
{
init = true;
OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
if (::GetVersionEx (&osvi))
{
if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)
{
if (osvi.dwMajorVersion >= 4)
{
unicodeSupported = true;
}
}
}
}
return unicodeSupported;
}
// *************************************************************************** // ***************************************************************************
void setWindowText(HWND hwnd, LPCWSTR lpText) void setWindowText(HWND hwnd, LPCWSTR lpText)
{ {
if (supportUnicode()) if (CSystemUtils::supportUnicode())
{ {
SetWindowTextW(hwnd, lpText); SetWindowTextW(hwnd, lpText);
} }

View file

@ -44,7 +44,7 @@ uint HardwareSoundBuffer;
uint64 SystemMemory; uint64 SystemMemory;
uint CPUFrequency; uint CPUFrequency;
bool GetGLInformations () bool GetGLInformation ()
{ {
// *** INIT VARIABLES // *** INIT VARIABLES
@ -66,7 +66,7 @@ bool GetGLInformations ()
wc.hIcon = (HICON)NULL; wc.hIcon = (HICON)NULL;
wc.hCursor = LoadCursor(NULL,IDC_ARROW); wc.hCursor = LoadCursor(NULL,IDC_ARROW);
wc.hbrBackground = WHITE_BRUSH; wc.hbrBackground = WHITE_BRUSH;
wc.lpszClassName = "RyzomGetGlInformations"; wc.lpszClassName = "RyzomGetGlInformation";
wc.lpszMenuName = NULL; wc.lpszMenuName = NULL;
if ( !RegisterClass(&wc) ) if ( !RegisterClass(&wc) )
return false; return false;
@ -78,7 +78,7 @@ bool GetGLInformations ()
WndRect.top=0; WndRect.top=0;
WndRect.right=100; WndRect.right=100;
WndRect.bottom=100; WndRect.bottom=100;
HWND hWnd = CreateWindow ( "RyzomGetGlInformations", HWND hWnd = CreateWindow ( "RyzomGetGlInformation",
"", "",
WndFlags, WndFlags,
CW_USEDEFAULT,CW_USEDEFAULT, CW_USEDEFAULT,CW_USEDEFAULT,
@ -122,7 +122,7 @@ bool GetGLInformations ()
HGLRC hRC = wglCreateContext (hDC); HGLRC hRC = wglCreateContext (hDC);
wglMakeCurrent(hDC, hRC); wglMakeCurrent(hDC, hRC);
// *** GET INFORMATIONS // *** GET INFORMATION
GLVendor = (const char *) glGetString (GL_VENDOR); GLVendor = (const char *) glGetString (GL_VENDOR);
GLRenderer = (const char *) glGetString (GL_RENDERER); GLRenderer = (const char *) glGetString (GL_RENDERER);
@ -168,7 +168,7 @@ bool GetGLInformations ()
// *************************************************************************** // ***************************************************************************
bool GetD3DInformations (NL3D::IDriver *d3dDriver) bool GetD3DInformation (NL3D::IDriver *d3dDriver)
{ {
IDriver::CAdapter desc; IDriver::CAdapter desc;
if (d3dDriver->getAdapter (0xffffffff, desc)) if (d3dDriver->getAdapter (0xffffffff, desc))
@ -248,10 +248,10 @@ bool GetHardwareSoundBuffer ()
// *************************************************************************** // ***************************************************************************
bool GetSystemInformations (IDriver *d3dDriver) bool GetSystemInformation (IDriver *d3dDriver)
{ {
bool result = GetGLInformations (); bool result = GetGLInformation ();
result |= GetD3DInformations (d3dDriver); result |= GetD3DInformation (d3dDriver);
result |= GetVideoMemory (); result |= GetVideoMemory ();
result |= GetHardwareSoundBuffer (); result |= GetHardwareSoundBuffer ();
SystemMemory = CSystemInfo::totalPhysicalMemory (); SystemMemory = CSystemInfo::totalPhysicalMemory ();

View file

@ -153,8 +153,8 @@ extern uint CPUFrequency;
// Register video modes // Register video modes
void RegisterVideoModes (uint mode, NL3D::IDriver *driver); void RegisterVideoModes (uint mode, NL3D::IDriver *driver);
// Get opengl informations // Get opengl information
bool GetSystemInformations (NL3D::IDriver *d3dDriver); bool GetSystemInformation (NL3D::IDriver *d3dDriver);
// *************************************************************************** // ***************************************************************************