Merge with develop

--HG--
branch : compatibility-develop
This commit is contained in:
kervala 2016-01-09 16:32:59 +01:00
commit ef8c8d0401
3 changed files with 5 additions and 18 deletions

View file

@ -762,7 +762,7 @@ namespace NLQT
return proc(driver, message); return proc(driver, message);
#else #else
x11Proc proc = (x11Proc)driver->getWindowProc(); x11Proc proc = (x11Proc)driver->getWindowProc();
return proc(driver, message); return proc(driver, (XEvent*)message);
#endif #endif
} }
} }

View file

@ -280,31 +280,17 @@ bool CPatchManager::unpack7Zip(const std::string &sevenZipFile, const std::strin
Byte *outBuffer = 0; /* it must be 0 before first call for each new archive. */ Byte *outBuffer = 0; /* it must be 0 before first call for each new archive. */
size_t outBufferSize = 0; /* it can have any value before first call (if outBuffer = 0) */ size_t outBufferSize = 0; /* it can have any value before first call (if outBuffer = 0) */
size_t offset; size_t offset = 0;
size_t outSizeProcessed = 0; size_t outSizeProcessed = 0;
// get the first file // get the first file
CFileItem *f = db.Database.Files;
res = SzExtract(&inStr, &db, 0, res = SzExtract(&inStr, &db, 0,
&blockIndex, &outBuffer, &outBufferSize, &blockIndex, &outBuffer, &outBufferSize,
&offset, &outSizeProcessed, &offset, &outSizeProcessed,
&allocImp, &allocTempImp); &allocImp, &allocTempImp);
// write the extracted file // write the extracted file
FILE *outputHandle; FILE *outputHandle = fopen(destFileName.c_str(), "wb+");
UInt32 processedSize;
char *fileName = f->Name;
size_t nameLen = strlen(f->Name);
for (; nameLen > 0; nameLen--)
{
if (f->Name[nameLen - 1] == '/')
{
fileName = f->Name + nameLen;
break;
}
}
outputHandle = fopen(destFileName.c_str(), "wb+");
if (outputHandle == 0) if (outputHandle == 0)
{ {
@ -312,7 +298,7 @@ bool CPatchManager::unpack7Zip(const std::string &sevenZipFile, const std::strin
return false; return false;
} }
processedSize = (UInt32)fwrite(outBuffer + offset, 1, outSizeProcessed, outputHandle); UInt32 processedSize = (UInt32)fwrite(outBuffer + offset, 1, outSizeProcessed, outputHandle);
if (processedSize != outSizeProcessed) if (processedSize != outSizeProcessed)
{ {

View file

@ -3,6 +3,7 @@ FILE(GLOB SRC main.cpp
${CMAKE_SOURCE_DIR}/ryzom/client/src/user_agent.cpp ${CMAKE_SOURCE_DIR}/ryzom/client/src/user_agent.cpp
${CMAKE_SOURCE_DIR}/ryzom/client/src/client_cfg.cpp ${CMAKE_SOURCE_DIR}/ryzom/client/src/client_cfg.cpp
${CMAKE_SOURCE_DIR}/ryzom/client/src/login_patch.cpp ${CMAKE_SOURCE_DIR}/ryzom/client/src/login_patch.cpp
${CMAKE_SOURCE_DIR}/ryzom/client/src/login_patch_seven_zip.cpp
${CMAKE_SOURCE_DIR}/ryzom/client/src/login_xdelta.cpp ${CMAKE_SOURCE_DIR}/ryzom/client/src/login_xdelta.cpp
${CMAKE_SOURCE_DIR}/ryzom/client/src/stdpch.cpp ${CMAKE_SOURCE_DIR}/ryzom/client/src/stdpch.cpp
${CMAKE_SOURCE_DIR}/ryzom/client/src/stdpch.h ${CMAKE_SOURCE_DIR}/ryzom/client/src/stdpch.h