Merge branch 'master' of https://github.com/WagicProject/wagic into cmake
This commit is contained in:
7
thirdparty/SDL/src/atomic/SDL_spinlock.c
vendored
7
thirdparty/SDL/src/atomic/SDL_spinlock.c
vendored
@@ -77,6 +77,13 @@ SDL_AtomicTryLock(SDL_SpinLock *lock)
|
||||
: "=&r" (result) : "r" (1), "r" (lock) : "cc", "memory");
|
||||
return (result == 0);
|
||||
|
||||
#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
|
||||
int result;
|
||||
__asm__ __volatile__(
|
||||
"lock ; xchgl %0, (%1)\n"
|
||||
: "=r" (result) : "r" (lock), "0" (1) : "cc", "memory");
|
||||
return (result == 0);
|
||||
|
||||
#else
|
||||
/* Need CPU instructions for spinlock here! */
|
||||
__need_spinlock_implementation__
|
||||
|
||||
4
thirdparty/zipFS/zfsystem.cpp
vendored
4
thirdparty/zipFS/zfsystem.cpp
vendored
@@ -631,8 +631,8 @@ streamoff filesystem::CentralDirZipped(std::istream & File, std::streamoff begin
|
||||
std::streamoff eof = begin + size;
|
||||
|
||||
// Look for the "end of central dir" header. Start minimum 22 bytes before end.
|
||||
if (! File.seekg(eof - 22, ios::beg))
|
||||
return -1;
|
||||
if (! File.seekg(eof - 22, ios::beg))
|
||||
return -1;
|
||||
|
||||
streamoff EndPos;
|
||||
streamoff StartPos = File.tellg();
|
||||
|
||||
4
thirdparty/zipFS/zfsystem.h
vendored
4
thirdparty/zipFS/zfsystem.h
vendored
@@ -258,8 +258,8 @@ inline void izfstream::open(const char * FilePath, filesystem * pFS) {
|
||||
if (pFS)
|
||||
m_pFS = pFS;
|
||||
|
||||
if (m_pFS != NULL)
|
||||
m_pFS->Open(* this, FilePath);
|
||||
if (m_pFS != NULL)
|
||||
m_pFS->Open(* this, FilePath);
|
||||
}
|
||||
|
||||
inline void izfstream::close() {
|
||||
|
||||
4
thirdparty/zipFS/zstream.cpp
vendored
4
thirdparty/zipFS/zstream.cpp
vendored
@@ -76,8 +76,8 @@ bool zbuffer::use(std::streamoff Offset, std::streamoff Size)
|
||||
return false;
|
||||
|
||||
//Don't use a buffer already used;
|
||||
if (m_Used)
|
||||
return false;
|
||||
if (m_Used)
|
||||
return false;
|
||||
|
||||
// adjust file position
|
||||
if (! m_ZipFile.seekg(Offset, ios::beg))
|
||||
|
||||
Reference in New Issue
Block a user