wxPlatformInfo (patch 1532064)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -287,22 +287,20 @@ wxString wxGetDataDir()
|
||||
return dir;
|
||||
}
|
||||
|
||||
int wxGetOsVersion(int *verMaj, int *verMin)
|
||||
bool wxIsPlatformLittleEndian()
|
||||
{
|
||||
// we want this function to work even if there is no wxApp
|
||||
wxConsoleAppTraits traitsConsole;
|
||||
wxAppTraits *traits = wxTheApp ? wxTheApp->GetTraits() : NULL;
|
||||
if ( ! traits )
|
||||
traits = &traitsConsole;
|
||||
// Are we little or big endian? This method is from Harbison & Steele.
|
||||
union
|
||||
{
|
||||
long l;
|
||||
char c[sizeof(long)];
|
||||
} u;
|
||||
u.l = 1;
|
||||
|
||||
wxToolkitInfo& info = traits->GetToolkitInfo();
|
||||
if ( verMaj )
|
||||
*verMaj = info.versionMajor;
|
||||
if ( verMin )
|
||||
*verMin = info.versionMinor;
|
||||
return info.os;
|
||||
return u.c[0] == 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Class to make it easier to specify platform-dependent values
|
||||
*/
|
||||
|
Reference in New Issue
Block a user