Patch level : 10.0

Files correlati     : xvaga.dll
Ricompilazione Demo : [ ]
Commento            :
Migliorato calcolo memoria disponibile anche oltre i 2 GB


git-svn-id: svn://10.65.10.50/trunk@17991 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2009-01-07 15:47:19 +00:00
parent cf4332ac04
commit f318b43a1e
2 changed files with 25 additions and 30 deletions

View File

@ -3688,11 +3688,10 @@ long xvt_sys_close_siblings(WINDOW win)
BOOLEAN xvt_sys_goto_url(const char* url, const char* action)
{
#ifdef WIN32
if (action != NULL && xvt_str_compare_ignoring_case(action, "open") != 0)
return OsWin32_GotoUrl(url, action);
#else
SORRY_BOX(); // TBI
return FALSE;
#endif
return wxLaunchDefaultBrowser(url);
}
BOOLEAN xvt_sys_dongle_server_is_running()
@ -3854,20 +3853,14 @@ int xvt_sys_get_session_id()
unsigned long xvt_sys_get_free_memory()
{
unsigned long mem = 0;
if (::wxGetFreeMemory().GetHi())
mem = (unsigned long)-1;
else
mem = ::wxGetFreeMemory().GetLo();
return mem;
const wxMemorySize sz = ::wxGetFreeMemory();
return sz.GetHi() ? -1 : sz.GetLo();
}
unsigned long xvt_sys_get_free_memory_kb()
{
unsigned long mem = xvt_sys_get_free_memory();
return mem / 1024; // Arrotondo per difetto
const wxMemorySize sz = ::wxGetFreeMemory() / 1024; // Arrotondo per difetto
return sz.GetHi() ? -1 : sz.GetLo();
}
int xvt_sys_get_os_version()
@ -3896,7 +3889,9 @@ int xvt_sys_get_os_version()
int xvt_sys_get_version(char* os_version, char* ptk_version, int maxsize)
{
if (os_version)
wxStrncpy(os_version, wxGetOsDescription(), maxsize);
if (ptk_version)
wxStrncpy(ptk_version, wxVERSION_STRING, maxsize);
return xvt_sys_get_os_version();
}