mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-12 00:59:41 +01:00
Merge pull request #9822 from nagisa/windows-has-no-weak-linking
Fix Windows XP support in LocalFileLoader
This commit is contained in:
commit
5175abe1fd
1 file changed
+5
-3
@@ -58,11 +58,13 @@ LocalFileLoader::LocalFileLoader(const std::string &filename)
|
||||
if (handle_ == INVALID_HANDLE_VALUE) {
|
||||
return;
|
||||
}
|
||||
FILE_STANDARD_INFO info;
|
||||
if (GetFileInformationByHandleEx(handle_, FileStandardInfo, &info, sizeof(info)) == 0) {
|
||||
LARGE_INTEGER end_offset;
|
||||
const LARGE_INTEGER zero = { 0 };
|
||||
if(SetFilePointerEx(handle_, zero, &end_offset, FILE_END) == 0) {
|
||||
return;
|
||||
}
|
||||
filesize_ = info.EndOfFile.QuadPart;
|
||||
filesize_ = end_offset.QuadPart;
|
||||
SetFilePointerEx(handle_, zero, nullptr, FILE_BEGIN);
|
||||
|
||||
#endif // !_WIN32
|
||||
|
||||
|
||||
Reference in new issue
Block a user