Optimizations

- Increase warning level
- Use proper casting
- Fix some more warnings.
This commit is contained in:
momo5502
2016-01-24 12:19:34 +01:00
parent a4bc6ee8d5
commit d28323f73e
45 changed files with 229 additions and 205 deletions

View File

@ -32,7 +32,7 @@ namespace Steam
CryptProtectData(Data, NULL, NULL, NULL, NULL, CRYPTPROTECT_LOCAL_MACHINE, &Data[1]);
subId = ::Utils::OneAtATime((char*)Data[1].pbData, 52);
subId = ::Utils::OneAtATime(reinterpret_cast<char*>(Data[1].pbData), 52);
if (!subId)
{

View File

@ -57,7 +57,11 @@ namespace Steam
if (Steam::Overlay)
{
FARPROC setPosition = GetProcAddress(Steam::Overlay, "SetNotificationPosition");
::Utils::Hook::Call<void(int)>(setPosition)(eNotificationPosition);
if (setPosition)
{
::Utils::Hook::Call<void(int)>(setPosition)(eNotificationPosition);
}
}
}

View File

@ -81,7 +81,7 @@ namespace Steam
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Valve\\Steam", 0, KEY_QUERY_VALUE, &hRegKey) == ERROR_SUCCESS)
{
DWORD dwLength = sizeof(steamPath);
RegQueryValueExA(hRegKey, "InstallPath", NULL, NULL, (BYTE*)steamPath, &dwLength);
RegQueryValueExA(hRegKey, "InstallPath", NULL, NULL, reinterpret_cast<BYTE*>(steamPath), &dwLength);
RegCloseKey(hRegKey);
SetDllDirectory(steamPath);