From 8f9b703dbb2f1be5bcc5b8558eaaf012f09646de Mon Sep 17 00:00:00 2001 From: momo5502 Date: Fri, 8 Jan 2016 22:33:47 +0100 Subject: [PATCH] Temporary fix for invalid hardware guids. --- src/Steam/Interfaces/SteamUser.cpp | 6 ++++++ src/Steam/Steam.cpp | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Steam/Interfaces/SteamUser.cpp b/src/Steam/Interfaces/SteamUser.cpp index 01898aa6..888c8e28 100644 --- a/src/Steam/Interfaces/SteamUser.cpp +++ b/src/Steam/Interfaces/SteamUser.cpp @@ -33,6 +33,12 @@ namespace Steam CryptProtectData(Data, NULL, NULL, NULL, NULL, CRYPTPROTECT_LOCAL_MACHINE, &Data[1]); subId = ::Utils::OneAtATime((char*)Data[1].pbData, 52); + + if (!subId) + { + Components::Logger::Print("Hardware-based GUID generation failed!\n"); + subId = (Game::Com_Milliseconds() + timeGetTime()); + } } else // Random guid { diff --git a/src/Steam/Steam.cpp b/src/Steam/Steam.cpp index d74d5410..5c940f35 100644 --- a/src/Steam/Steam.cpp +++ b/src/Steam/Steam.cpp @@ -85,9 +85,9 @@ namespace Steam RegCloseKey(hRegKey); SetDllDirectory(steamPath); - } - Overlay = LoadLibraryA(::Utils::VA("%s\\%s", steamPath, "gameoverlayrenderer.dll")); + Overlay = LoadLibraryA(::Utils::VA("%s\\%s", steamPath, "gameoverlayrenderer.dll")); + } } return true;