mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
Rename fields to avoid some gross #define hack that linux is doing
This commit is contained in:
parent
77e9ea38aa
commit
6fcbfabdd2
@ -440,9 +440,9 @@ bool GetFileDetails(const std::string &filename, FileDetails *details) {
|
||||
return false;
|
||||
details->isDirectory = (attr.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0;
|
||||
details->size = ((u64)attr.nFileSizeHigh << 32) | (u64)attr.nFileSizeLow;
|
||||
details->st_atime = FiletimeToStatTime(attr.ftLastAccessTime);
|
||||
details->st_mtime = FiletimeToStatTime(attr.ftLastWriteTime);
|
||||
details->st_ctime = FiletimeToStatTime(attr.ftCreationTime);
|
||||
details->atime = FiletimeToStatTime(attr.ftLastAccessTime);
|
||||
details->mtime = FiletimeToStatTime(attr.ftLastWriteTime);
|
||||
details->ctime = FiletimeToStatTime(attr.ftCreationTime);
|
||||
if (attr.dwFileAttributes & FILE_ATTRIBUTE_READONLY) {
|
||||
details->access = 0444; // Read
|
||||
} else {
|
||||
@ -460,9 +460,9 @@ bool GetFileDetails(const std::string &filename, FileDetails *details) {
|
||||
if (stat64(filename.c_str(), &buf) == 0) {
|
||||
details->size = buf.st_size;
|
||||
details->isDirectory = S_ISDIR(buf.st_mode);
|
||||
details->st_atime = buf.st_atime;
|
||||
details->st_mtime = buf.st_mtime;
|
||||
details->st_ctime = buf.st_ctime;
|
||||
details->atime = buf.st_atime;
|
||||
details->mtime = buf.st_mtime;
|
||||
details->ctime = buf.st_ctime;
|
||||
details->access = buf.st_mode & 0x1ff;
|
||||
return true;
|
||||
} else {
|
||||
@ -475,7 +475,7 @@ bool GetModifTime(const std::string &filename, tm &return_time) {
|
||||
memset(&return_time, 0, sizeof(return_time));
|
||||
FileDetails details;
|
||||
if (GetFileDetails(filename, &details)) {
|
||||
time_t t = details.st_mtime;
|
||||
time_t t = details.mtime;
|
||||
localtime_r((time_t*)&t, &return_time);
|
||||
return true;
|
||||
} else {
|
||||
|
@ -48,9 +48,9 @@ struct FSTEntry
|
||||
struct FileDetails {
|
||||
bool isDirectory;
|
||||
u64 size;
|
||||
uint64_t st_atime;
|
||||
uint64_t st_mtime;
|
||||
uint64_t st_ctime;
|
||||
uint64_t atime;
|
||||
uint64_t mtime;
|
||||
uint64_t ctime;
|
||||
uint32_t access; // st_mode & 0x1ff
|
||||
};
|
||||
|
||||
|
@ -687,9 +687,9 @@ PSPFileInfo DirectoryFileSystem::GetFileInfo(std::string filename) {
|
||||
} else {
|
||||
x.size = details.size;
|
||||
x.access = details.access;
|
||||
time_t atime = details.st_atime;
|
||||
time_t ctime = details.st_ctime;
|
||||
time_t mtime = details.st_mtime;
|
||||
time_t atime = details.atime;
|
||||
time_t ctime = details.ctime;
|
||||
time_t mtime = details.mtime;
|
||||
|
||||
localtime_r((time_t*)&atime, &x.atime);
|
||||
localtime_r((time_t*)&ctime, &x.ctime);
|
||||
|
@ -606,9 +606,9 @@ PSPFileInfo VirtualDiscFileSystem::GetFileInfo(std::string filename) {
|
||||
} else {
|
||||
x.size = details.size;
|
||||
x.access = details.access;
|
||||
time_t atime = details.st_atime;
|
||||
time_t ctime = details.st_ctime;
|
||||
time_t mtime = details.st_mtime;
|
||||
time_t atime = details.atime;
|
||||
time_t ctime = details.ctime;
|
||||
time_t mtime = details.mtime;
|
||||
|
||||
localtime_r((time_t*)&atime, &x.atime);
|
||||
localtime_r((time_t*)&ctime, &x.ctime);
|
||||
|
Loading…
Reference in New Issue
Block a user