Serialize a protobuf body object into a thread-local buffer for the GamesPlayed observer (runs on Steam's network thread).
| 247 | // Serialize a protobuf body object into a thread-local buffer for the |
| 248 | // GamesPlayed observer (runs on Steam's network thread). |
| 249 | static const uint8_t* SerializeBodyTL(void* bodyObj, size_t* outLen) { |
| 250 | static thread_local std::vector<uint8_t> tlBuf; |
| 251 | tlBuf = SerializeMessage(bodyObj); |
| 252 | if (outLen) *outLen = tlBuf.size(); |
| 253 | return tlBuf.empty() ? nullptr : tlBuf.data(); |
| 254 | } |
| 255 | |
| 256 | void CloudHooks::InstallGamesPlayedObserver(uintptr_t steamclientBase, size_t steamclientSize) { |
| 257 | if (!g_serializeToArray) { |
nothing calls this directly
no test coverage detected