Core/Misc: update g3dlite lib (#2904)

* Core/Misc: update g3dlite lib

* update

Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
This commit is contained in:
Viste
2020-07-30 13:35:45 +03:00
committed by GitHub
parent 91bbbf08eb
commit fcaf91b8b2
183 changed files with 13258 additions and 8022 deletions

View File

@@ -11,7 +11,7 @@
#include "G3D/platform.h"
// This file is only used on Windows
#ifdef G3D_WIN32
#ifdef G3D_WINDOWS
#include "G3D/RegistryUtil.h"
#include "G3D/System.h"
@@ -24,7 +24,6 @@
# define HKEY_PERFORMANCE_NLSTEXT ((HKEY)((LONG)0x80000060))
# endif
#endif
namespace G3D {
// static helpers
@@ -256,7 +255,8 @@ bool RegistryUtil::writeString(const std::string& key, const std::string& value,
debugAssert(result == ERROR_SUCCESS || result == ERROR_FILE_NOT_FOUND);
if (result == ERROR_SUCCESS) {
result = RegSetValueExA(openKey, value.c_str(), 0, REG_SZ, reinterpret_cast<const BYTE*>(data.c_str()), (data.size() + 1));
alwaysAssertM(data.size() < 0xFFFFFFFE, "String too long");
result = RegSetValueExA(openKey, value.c_str(), 0, REG_SZ, reinterpret_cast<const BYTE*>(data.c_str()), (int)(data.size() + 1));
debugAssertM(result == ERROR_SUCCESS, "Could not write registry key value.");
RegCloseKey(openKey);
@@ -296,4 +296,4 @@ static HKEY getRootKeyFromString(const char* str, size_t length) {
} // namespace G3D
#endif // G3D_WIN32
#endif // G3D_WINDOWS