Merge with develop
This commit is contained in:
commit
4a8741a9b0
4 changed files with 21 additions and 11 deletions
|
@ -231,11 +231,11 @@ bool CSystemUtils::supportUnicode()
|
||||||
{
|
{
|
||||||
init = true;
|
init = true;
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
OSVERSIONINFO osvi;
|
OSVERSIONINFOA osvi;
|
||||||
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||||
|
|
||||||
// get Windows version
|
// get Windows version
|
||||||
if (GetVersionEx(&osvi))
|
if (GetVersionExA(&osvi))
|
||||||
{
|
{
|
||||||
if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)
|
if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)
|
||||||
{
|
{
|
||||||
|
@ -347,7 +347,7 @@ bool CSystemUtils::setRegKey(const string &ValueName, const string &Value)
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
DWORD dwDisp;
|
DWORD dwDisp;
|
||||||
|
|
||||||
if (RegCreateKeyExW(HKEY_CURRENT_USER, utf8ToWide(RootKey), 0, L"", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey, &dwDisp) == ERROR_SUCCESS)
|
if (RegCreateKeyExW(HKEY_CURRENT_USER, utf8ToWide(RootKey), 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey, &dwDisp) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
ucstring utf16Value = ucstring::makeFromUtf8(Value);
|
ucstring utf16Value = ucstring::makeFromUtf8(Value);
|
||||||
|
|
||||||
|
|
|
@ -2212,9 +2212,11 @@ bool CClientConfig::getDefaultConfigLocation(std::string& p_name) const
|
||||||
defaultConfigPath = Args.getProgramPath();
|
defaultConfigPath = Args.getProgramPath();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
std::string currentPath = CPath::standardizePath(CPath::getCurrentPath());
|
||||||
|
|
||||||
// look in the current working directory first
|
// look in the current working directory first
|
||||||
if (CFile::isExists(defaultConfigFileName))
|
if (CFile::isExists(currentPath + defaultConfigFileName))
|
||||||
p_name = defaultConfigFileName;
|
p_name = currentPath + defaultConfigFileName;
|
||||||
|
|
||||||
// look in startup directory
|
// look in startup directory
|
||||||
else if (CFile::isExists(Args.getStartupPath() + defaultConfigFileName))
|
else if (CFile::isExists(Args.getStartupPath() + defaultConfigFileName))
|
||||||
|
|
|
@ -1029,12 +1029,20 @@ void CPatchManager::executeBatchFile()
|
||||||
arguments += "\"" + RyzomFilename + "\" \"" + ClientPatchPath + "\" " + ClientRootPath + "\"";
|
arguments += "\"" + RyzomFilename + "\" \"" + ClientPatchPath + "\" " + ClientRootPath + "\"";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// append login and password
|
// append login, password and shard
|
||||||
arguments += " " + LoginLogin + " " + LoginPassword;
|
if (!LoginLogin.empty())
|
||||||
|
|
||||||
if (!r2Mode)
|
|
||||||
{
|
{
|
||||||
arguments += " " + toString(LoginShardId);
|
arguments += " " + LoginLogin;
|
||||||
|
|
||||||
|
if (!LoginPassword.empty())
|
||||||
|
{
|
||||||
|
arguments += " " + LoginPassword;
|
||||||
|
|
||||||
|
if (!r2Mode)
|
||||||
|
{
|
||||||
|
arguments += " " + toString(LoginShardId);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!launchProgram(batchFilename, arguments, false))
|
if (!launchProgram(batchFilename, arguments, false))
|
||||||
|
|
|
@ -79,7 +79,7 @@ bool CHttpClient::send(const std::string& buffer, bool verbose)
|
||||||
|
|
||||||
if(verbose)
|
if(verbose)
|
||||||
{
|
{
|
||||||
nldebug("Sending '%s' to '%s'", buffer.c_str(), _Sock.remoteAddr().asString().c_str());
|
nldebug("Sending '%s' to '%s'", trim(buffer).c_str(), _Sock.remoteAddr().asString().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 size = (uint32)buffer.size();
|
uint32 size = (uint32)buffer.size();
|
||||||
|
|
Loading…
Reference in a new issue