More optimization.
This commit is contained in:
@ -51,7 +51,7 @@ namespace Steam
|
||||
unsigned __int64 Matchmaking::CreateLobby(int eLobbyType, int cMaxMembers)
|
||||
{
|
||||
uint64_t result = Callbacks::RegisterCall();
|
||||
LobbyCreated* retvals = new LobbyCreated;
|
||||
LobbyCreated* retvals = ::Utils::Memory::AllocateArray<LobbyCreated>();
|
||||
SteamID id;
|
||||
|
||||
id.AccountID = 1337132;
|
||||
@ -72,7 +72,7 @@ namespace Steam
|
||||
unsigned __int64 Matchmaking::JoinLobby(SteamID steamIDLobby)
|
||||
{
|
||||
uint64_t result = Callbacks::RegisterCall();
|
||||
LobbyEnter* retvals = new LobbyEnter;
|
||||
LobbyEnter* retvals = ::Utils::Memory::AllocateArray<LobbyEnter>();
|
||||
retvals->m_bLocked = false;
|
||||
retvals->m_EChatRoomEnterResponse = 1;
|
||||
retvals->m_rgfChatPermissions = 0xFFFFFFFF;
|
||||
|
@ -61,7 +61,7 @@ namespace Steam
|
||||
|
||||
if (result.data)
|
||||
{
|
||||
delete[] result.data;
|
||||
::Utils::Memory::Free(result.data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -77,9 +77,9 @@ namespace Steam
|
||||
if (!Overlay)
|
||||
{
|
||||
HKEY hRegKey;
|
||||
char steamPath[MAX_PATH] = { 0 };
|
||||
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Valve\\Steam", 0, KEY_QUERY_VALUE, &hRegKey) == ERROR_SUCCESS)
|
||||
{
|
||||
char steamPath[MAX_PATH] = { 0 };
|
||||
DWORD dwLength = sizeof(steamPath);
|
||||
RegQueryValueExA(hRegKey, "InstallPath", NULL, NULL, reinterpret_cast<BYTE*>(steamPath), &dwLength);
|
||||
RegCloseKey(hRegKey);
|
||||
|
Reference in New Issue
Block a user