diff options
author | rubidium <rubidium@openttd.org> | 2009-01-16 12:59:47 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-01-16 12:59:47 +0000 |
commit | eff693d2e9b45a02177ee600e43576e6d733a2bd (patch) | |
tree | eef2f6bd0f7e1c471cd04882c93477dbfe6df764 /src/win32.cpp | |
parent | 5d585dcb4d34277be445f7cad6672afb96113d47 (diff) | |
download | openttd-eff693d2e9b45a02177ee600e43576e6d733a2bd.tar.xz |
(svn r15104) -Codechange: unify the resolving of the xyz kbytes/megabytes strings.
Diffstat (limited to 'src/win32.cpp')
-rw-r--r-- | src/win32.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/win32.cpp b/src/win32.cpp index 76e6c034e..f57ed5052 100644 --- a/src/win32.cpp +++ b/src/win32.cpp @@ -843,7 +843,7 @@ bool FiosIsHiddenFile(const struct dirent *ent) return (ent->dir->fd.dwFileAttributes & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) != 0; } -bool FiosGetDiskFreeSpace(const char *path, uint32 *tot) +bool FiosGetDiskFreeSpace(const char *path, uint64 *tot) { UINT sem = SetErrorMode(SEM_FAILCRITICALERRORS); // disable 'no-disk' message box bool retval = false; @@ -852,7 +852,7 @@ bool FiosGetDiskFreeSpace(const char *path, uint32 *tot) _sntprintf(root, lengthof(root), _T("%c:") _T(PATHSEP), path[0]); if (tot != NULL && GetDiskFreeSpace(root, &spc, &bps, &nfc, &tnc)) { - *tot = ((spc * bps) * (uint64)nfc) >> 20; + *tot = ((spc * bps) * (uint64)nfc); retval = true; } |