From 45d76fbc31d4de63deb1669f283128fe609fbf13 Mon Sep 17 00:00:00 2001 From: otavepto <153766569+otavepto@users.noreply.github.com> Date: Sat, 20 Jan 2024 03:32:01 +0200 Subject: [PATCH] bunch of scoped debug messages --- dll/dll/steam_controller.h | 26 ++--- dll/dll/steam_inventory.h | 96 ++++++++--------- dll/dll/steam_matchmaking.h | 164 +++++++++++++++--------------- dll/dll/steam_tv.h | 16 +-- dll/dll/steam_user.h | 48 ++++----- dll/dll/steam_user_stats.h | 88 ++++++++-------- dll/dll/steam_utils.h | 101 ++++++++++-------- dll/steam_apps.cpp | 68 ++++++------- dll/steam_gameserver.cpp | 102 +++++++++---------- dll/steam_gameserverstats.cpp | 20 ++-- dll/steam_http.cpp | 50 ++++----- dll/steam_matchmaking_servers.cpp | 98 +++++++++--------- dll/steam_music.cpp | 18 ++-- dll/steam_musicremote.cpp | 64 ++++++------ dll/steam_parental.cpp | 12 +-- dll/steam_screenshots.cpp | 20 ++-- dll/steam_video.cpp | 8 +- 17 files changed, 508 insertions(+), 491 deletions(-) diff --git a/dll/dll/steam_controller.h b/dll/dll/steam_controller.h index 365376fd..2cc06c5d 100644 --- a/dll/dll/steam_controller.h +++ b/dll/dll/steam_controller.h @@ -368,14 +368,14 @@ void SetOverrideMode( const char *pchMode ) // configurations inside of the game depot instead of using the Steam Workshop bool SetInputActionManifestFilePath( const char *pchInputActionManifestAbsolutePath ) { - PRINT_DEBUG("TODO %s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_Controller::%s\n", __FUNCTION__); //TODO SteamInput005 return false; } bool BWaitForData( bool bWaitForever, uint32 unTimeout ) { - PRINT_DEBUG("TODO %s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_Controller::%s\n", __FUNCTION__); //TODO SteamInput005 return false; } @@ -385,7 +385,7 @@ bool BWaitForData( bool bWaitForever, uint32 unTimeout ) // SteamInput()->RunFrame() or SteamAPI_RunCallbacks() before this to update the data stream bool BNewDataAvailable() { - PRINT_DEBUG("TODO %s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_Controller::%s\n", __FUNCTION__); //TODO SteamInput005 return false; } @@ -395,7 +395,7 @@ bool BNewDataAvailable() // callback when you enable them void EnableDeviceCallbacks() { - PRINT_DEBUG("TODO %s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_Controller::%s\n", __FUNCTION__); //TODO SteamInput005 return; } @@ -405,7 +405,7 @@ void EnableDeviceCallbacks() // Note: this is called within either SteamInput()->RunFrame or by SteamAPI_RunCallbacks void EnableActionEventCallbacks( SteamInputActionEventCallbackPointer pCallback ) { - PRINT_DEBUG("TODO %s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_Controller::%s\n", __FUNCTION__); //TODO SteamInput005 return; } @@ -749,7 +749,7 @@ int GetDigitalActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t a // Returns a localized string (from Steam's language setting) for the user-facing action name corresponding to the specified handle const char *GetStringForDigitalActionName( InputDigitalActionHandle_t eActionHandle ) { - PRINT_DEBUG("TODO %s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_Controller::%s\n", __FUNCTION__); //TODO SteamInput005 return "Button String"; } @@ -922,7 +922,7 @@ void Legacy_TriggerRepeatedHapticPulse( InputHandle_t inputHandle, ESteamControl // Send a haptic pulse, works on Steam Deck and Steam Controller devices void TriggerSimpleHapticEvent( InputHandle_t inputHandle, EControllerHapticLocation eHapticLocation, uint8 nIntensity, char nGainDB, uint8 nOtherIntensity, char nOtherGainDB ) { - PRINT_DEBUG("TODO %s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_Controller::%s\n", __FUNCTION__); } // Tigger a vibration event on supported controllers. @@ -952,7 +952,7 @@ void TriggerVibration( ControllerHandle_t controllerHandle, unsigned short usLef // Trigger a vibration event on supported controllers including Xbox trigger impulse rumble - Steam will translate these commands into haptic pulses for Steam Controllers void TriggerVibrationExtended( InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed, unsigned short usLeftTriggerSpeed, unsigned short usRightTriggerSpeed ) { - PRINT_DEBUG("TODO %s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_Controller::%s\n", __FUNCTION__); TriggerVibration(inputHandle, usLeftSpeed, usRightSpeed); //TODO trigger impulse rumbles } @@ -1026,7 +1026,7 @@ const char *GetStringForActionOrigin( EInputActionOrigin eOrigin ) // Returns a localized string (from Steam's language setting) for the user-facing action name corresponding to the specified handle const char *GetStringForAnalogActionName( InputAnalogActionHandle_t eActionHandle ) { - PRINT_DEBUG("TODO %s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_Controller::%s\n", __FUNCTION__); //TODO SteamInput005 return "Button String"; } @@ -1119,7 +1119,7 @@ const char *GetGlyphForActionOrigin( EInputActionOrigin eOrigin ) // Get a local path to a PNG file for the provided origin's glyph. const char *GetGlyphPNGForActionOrigin( EInputActionOrigin eOrigin, ESteamInputGlyphSize eSize, uint32 unFlags ) { - PRINT_DEBUG("TODO %s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_Controller::%s\n", __FUNCTION__); //TODO SteamInput005 return GetGlyphForActionOrigin(eOrigin); } @@ -1127,7 +1127,7 @@ const char *GetGlyphPNGForActionOrigin( EInputActionOrigin eOrigin, ESteamInputG // Get a local path to a SVG file for the provided origin's glyph. const char *GetGlyphSVGForActionOrigin( EInputActionOrigin eOrigin, uint32 unFlags ) { - PRINT_DEBUG("TODO %s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_Controller::%s\n", __FUNCTION__); //TODO SteamInput005 return ""; } @@ -1210,14 +1210,14 @@ uint32 GetRemotePlaySessionID( InputHandle_t inputHandle ) // Note: user can override the settings from the Steamworks Partner site so the returned values may not exactly match your default configuration uint16 GetSessionInputConfigurationSettings() { - PRINT_DEBUG("TODO %s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_Controller::%s\n", __FUNCTION__); return 0; } // Set the trigger effect for a DualSense controller void SetDualSenseTriggerEffect( InputHandle_t inputHandle, const ScePadTriggerEffectParam *pParam ) { - PRINT_DEBUG("TODO %s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_Controller::%s\n", __FUNCTION__); } void RunCallbacks() diff --git a/dll/dll/steam_inventory.h b/dll/dll/steam_inventory.h index 4d30f20a..26898367 100644 --- a/dll/dll/steam_inventory.h +++ b/dll/dll/steam_inventory.h @@ -92,7 +92,7 @@ struct Steam_Inventory_Requests *get_inventory_result(SteamInventoryResult_t res void read_items_db() { std::string items_db_path = Local_Storage::get_game_settings_path() + items_user_file; - PRINT_DEBUG("Items file path: %s\n", items_db_path.c_str()); + PRINT_DEBUG("Steam_Inventory::Items file path: %s\n", items_db_path.c_str()); local_storage->load_json(items_db_path, defined_items); } @@ -103,7 +103,7 @@ void read_inventory_db() { // Try to load a default one std::string items_db_path = Local_Storage::get_game_settings_path() + items_default_file; - PRINT_DEBUG("Default items file path: %s\n", items_db_path.c_str()); + PRINT_DEBUG("Steam_Inventory::Default items file path: %s\n", items_db_path.c_str()); local_storage->load_json(items_db_path, user_items); } } @@ -156,7 +156,7 @@ Steam_Inventory(class Settings *settings, class SteamCallResults *callback_resul STEAM_METHOD_DESC(Find out the status of an asynchronous inventory result handle.) EResult GetResultStatus( SteamInventoryResult_t resultHandle ) { - PRINT_DEBUG("GetResultStatus\n"); + PRINT_DEBUG("Steam_Inventory::GetResultStatus\n"); std::lock_guard lock(global_mutex); struct Steam_Inventory_Requests *request = get_inventory_result(resultHandle); if (!request) return k_EResultInvalidParam; @@ -172,7 +172,7 @@ bool GetResultItems( SteamInventoryResult_t resultHandle, STEAM_OUT_ARRAY_COUNT( punOutItemsArraySize,Output array) SteamItemDetails_t *pOutItemsArray, uint32 *punOutItemsArraySize ) { - PRINT_DEBUG("GetResultItems\n"); + PRINT_DEBUG("Steam_Inventory::GetResultItems\n"); std::lock_guard lock(global_mutex); struct Steam_Inventory_Requests *request = get_inventory_result(resultHandle); if (!request) return false; @@ -235,7 +235,7 @@ bool GetResultItems( SteamInventoryResult_t resultHandle, } } - PRINT_DEBUG("GetResultItems good\n"); + PRINT_DEBUG("Steam_Inventory::GetResultItems good\n"); return true; } @@ -257,7 +257,7 @@ bool GetResultItemProperty( SteamInventoryResult_t resultHandle, const char *pchPropertyName, STEAM_OUT_STRING_COUNT( punValueBufferSizeOut ) char *pchValueBuffer, uint32 *punValueBufferSizeOut ) { - PRINT_DEBUG("GetResultItemProperty\n"); + PRINT_DEBUG("Steam_Inventory::GetResultItemProperty\n"); //TODO return false; } @@ -268,7 +268,7 @@ bool GetResultItemProperty( SteamInventoryResult_t resultHandle, STEAM_METHOD_DESC(Returns the server time at which the result was generated. Compare against the value of IClientUtils::GetServerRealTime() to determine age.) uint32 GetResultTimestamp( SteamInventoryResult_t resultHandle ) { - PRINT_DEBUG("GetResultTimestamp\n"); + PRINT_DEBUG("Steam_Inventory::GetResultTimestamp\n"); std::lock_guard lock(global_mutex); struct Steam_Inventory_Requests *request = get_inventory_result(resultHandle); if (!request || !request->result_done()) return 0; @@ -282,7 +282,7 @@ uint32 GetResultTimestamp( SteamInventoryResult_t resultHandle ) STEAM_METHOD_DESC(Returns true if the result belongs to the target steam ID or false if the result does not. This is important when using DeserializeResult to verify that a remote player is not pretending to have a different users inventory.) bool CheckResultSteamID( SteamInventoryResult_t resultHandle, CSteamID steamIDExpected ) { - PRINT_DEBUG("CheckResultSteamID %llu\n", steamIDExpected.ConvertToUint64()); + PRINT_DEBUG("Steam_Inventory::CheckResultSteamID %llu\n", steamIDExpected.ConvertToUint64()); //TODO return true; } @@ -292,7 +292,7 @@ bool CheckResultSteamID( SteamInventoryResult_t resultHandle, CSteamID steamIDEx STEAM_METHOD_DESC(Destroys a result handle and frees all associated memory.) void DestroyResult( SteamInventoryResult_t resultHandle ) { - PRINT_DEBUG("DestroyResult\n"); + PRINT_DEBUG("Steam_Inventory::DestroyResult\n"); std::lock_guard lock(global_mutex); auto request = std::find_if(inventory_requests.begin(), inventory_requests.end(), [&resultHandle](struct Steam_Inventory_Requests const& item) { return item.inventory_result == resultHandle; }); if (inventory_requests.end() == request) @@ -316,7 +316,7 @@ void DestroyResult( SteamInventoryResult_t resultHandle ) STEAM_METHOD_DESC(Captures the entire state of the current users Steam inventory.) bool GetAllItems( SteamInventoryResult_t *pResultHandle ) { - PRINT_DEBUG("GetAllItems\n"); + PRINT_DEBUG("Steam_Inventory::GetAllItems\n"); std::lock_guard lock(global_mutex); struct Steam_Inventory_Requests* request = new_inventory_result(); @@ -338,7 +338,7 @@ bool GetAllItems( SteamInventoryResult_t *pResultHandle ) STEAM_METHOD_DESC(Captures the state of a subset of the current users Steam inventory identified by an array of item instance IDs.) bool GetItemsByID( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT( unCountInstanceIDs ) const SteamItemInstanceID_t *pInstanceIDs, uint32 unCountInstanceIDs ) { - PRINT_DEBUG("GetItemsByID\n"); + PRINT_DEBUG("Steam_Inventory::GetItemsByID\n"); std::lock_guard lock(global_mutex); if (pResultHandle) { struct Steam_Inventory_Requests *request = new_inventory_result(false, pInstanceIDs, unCountInstanceIDs); @@ -368,7 +368,7 @@ bool GetItemsByID( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT( unC // an hour has elapsed. See DeserializeResult for expiration handling. bool SerializeResult( SteamInventoryResult_t resultHandle, STEAM_OUT_BUFFER_COUNT(punOutBufferSize) void *pOutBuffer, uint32 *punOutBufferSize ) { - PRINT_DEBUG("SerializeResult %i\n", resultHandle); + PRINT_DEBUG("Steam_Inventory::SerializeResult %i\n", resultHandle); std::lock_guard lock(global_mutex); //TODO struct Steam_Inventory_Requests *request = get_inventory_result(resultHandle); @@ -379,7 +379,7 @@ bool SerializeResult( SteamInventoryResult_t resultHandle, STEAM_OUT_BUFFER_COUN memset(buffer, 0x5F, sizeof(buffer)); if (!punOutBufferSize) return false; - PRINT_DEBUG("Size %u\n", *punOutBufferSize); + PRINT_DEBUG(" Size %u\n", *punOutBufferSize); if (!pOutBuffer) { *punOutBufferSize = sizeof(buffer); return true; @@ -414,7 +414,7 @@ bool SerializeResult( SteamInventoryResult_t resultHandle, STEAM_OUT_BUFFER_COUN // could challenge the player with expired data to send an updated result set. bool DeserializeResult( SteamInventoryResult_t *pOutResultHandle, STEAM_BUFFER_COUNT(punOutBufferSize) const void *pBuffer, uint32 unBufferSize, bool bRESERVED_MUST_BE_FALSE) { - PRINT_DEBUG("DeserializeResult\n"); + PRINT_DEBUG("Steam_Inventory::DeserializeResult\n"); std::lock_guard lock(global_mutex); //TODO if (pOutResultHandle) { @@ -439,7 +439,7 @@ bool DeserializeResult( SteamInventoryResult_t *pOutResultHandle, STEAM_BUFFER_C // describe the quantity of each item to generate. bool GenerateItems( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, STEAM_ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) { - PRINT_DEBUG("GenerateItems\n"); + PRINT_DEBUG("Steam_Inventory::GenerateItems\n"); return false; } @@ -451,7 +451,7 @@ bool GenerateItems( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT(unA STEAM_METHOD_DESC(GrantPromoItems() checks the list of promotional items for which the user may be eligible and grants the items (one time only).) bool GrantPromoItems( SteamInventoryResult_t *pResultHandle ) { - PRINT_DEBUG("GrantPromoItems\n"); + PRINT_DEBUG("Steam_Inventory::GrantPromoItems\n"); std::lock_guard lock(global_mutex); struct Steam_Inventory_Requests* request = new_inventory_result(false); @@ -467,7 +467,7 @@ bool GrantPromoItems( SteamInventoryResult_t *pResultHandle ) // showing a specific promo item to the user. bool AddPromoItem( SteamInventoryResult_t *pResultHandle, SteamItemDef_t itemDef ) { - PRINT_DEBUG("AddPromoItem\n"); + PRINT_DEBUG("Steam_Inventory::AddPromoItem\n"); //TODO std::lock_guard lock(global_mutex); struct Steam_Inventory_Requests* request = new_inventory_result(false); @@ -479,7 +479,7 @@ bool AddPromoItem( SteamInventoryResult_t *pResultHandle, SteamItemDef_t itemDef bool AddPromoItems( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, uint32 unArrayLength ) { - PRINT_DEBUG("AddPromoItems\n"); + PRINT_DEBUG("Steam_Inventory::AddPromoItems\n"); //TODO std::lock_guard lock(global_mutex); struct Steam_Inventory_Requests* request = new_inventory_result(false); @@ -496,7 +496,7 @@ bool AddPromoItems( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT(unA STEAM_METHOD_DESC(ConsumeItem() removes items from the inventory permanently.) bool ConsumeItem( SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemConsume, uint32 unQuantity ) { - PRINT_DEBUG("ConsumeItem %llu %u\n", itemConsume, unQuantity); + PRINT_DEBUG("Steam_Inventory::ConsumeItem %llu %u\n", itemConsume, unQuantity); std::lock_guard lock(global_mutex); auto it = user_items.find(std::to_string(itemConsume)); @@ -504,7 +504,7 @@ bool ConsumeItem( SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t i try { uint32 current = it->get(); - PRINT_DEBUG("ConsumeItem previous %u\n", current); + PRINT_DEBUG("Steam_Inventory::ConsumeItem previous %u\n", current); if (current < unQuantity) unQuantity = current; uint32 result = current - unQuantity; if (result == 0) { @@ -540,7 +540,7 @@ bool ExchangeItems( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT(unArrayGenerateLength) const SteamItemDef_t *pArrayGenerate, STEAM_ARRAY_COUNT(unArrayGenerateLength) const uint32 *punArrayGenerateQuantity, uint32 unArrayGenerateLength, STEAM_ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t *pArrayDestroy, STEAM_ARRAY_COUNT(unArrayDestroyLength) const uint32 *punArrayDestroyQuantity, uint32 unArrayDestroyLength ) { - PRINT_DEBUG("ExchangeItems\n"); + PRINT_DEBUG("Steam_Inventory::ExchangeItems\n"); return false; } @@ -552,7 +552,7 @@ bool ExchangeItems( SteamInventoryResult_t *pResultHandle, // two, pass k_SteamItemInstanceIDInvalid for itemIdDest and a new item will be generated. bool TransferItemQuantity( SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemIdSource, uint32 unQuantity, SteamItemInstanceID_t itemIdDest ) { - PRINT_DEBUG("TransferItemQuantity\n"); + PRINT_DEBUG("Steam_Inventory::TransferItemQuantity\n"); return false; } @@ -565,7 +565,7 @@ bool TransferItemQuantity( SteamInventoryResult_t *pResultHandle, SteamItemInsta STEAM_METHOD_DESC( Deprecated method. Playtime accounting is performed on the Steam servers. ) void SendItemDropHeartbeat() { - PRINT_DEBUG("SendItemDropHeartbeat\n"); + PRINT_DEBUG("Steam_Inventory::SendItemDropHeartbeat\n"); } @@ -581,7 +581,7 @@ void SendItemDropHeartbeat() STEAM_METHOD_DESC(Playtime credit must be consumed and turned into item drops by your game.) bool TriggerItemDrop( SteamInventoryResult_t *pResultHandle, SteamItemDef_t dropListDefinition ) { - PRINT_DEBUG("TriggerItemDrop %p %i\n", pResultHandle, dropListDefinition); + PRINT_DEBUG("Steam_Inventory::TriggerItemDrop %p %i\n", pResultHandle, dropListDefinition); //TODO: if gameserver return false std::lock_guard lock(global_mutex); struct Steam_Inventory_Requests* request = new_inventory_result(false); @@ -598,7 +598,7 @@ bool TradeItems( SteamInventoryResult_t *pResultHandle, CSteamID steamIDTradePar STEAM_ARRAY_COUNT(nArrayGiveLength) const SteamItemInstanceID_t *pArrayGive, STEAM_ARRAY_COUNT(nArrayGiveLength) const uint32 *pArrayGiveQuantity, uint32 nArrayGiveLength, STEAM_ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t *pArrayGet, STEAM_ARRAY_COUNT(nArrayGetLength) const uint32 *pArrayGetQuantity, uint32 nArrayGetLength ) { - PRINT_DEBUG("TradeItems\n"); + PRINT_DEBUG("Steam_Inventory::TradeItems\n"); return false; } @@ -621,7 +621,7 @@ bool TradeItems( SteamInventoryResult_t *pResultHandle, CSteamID steamIDTradePar STEAM_METHOD_DESC(LoadItemDefinitions triggers the automatic load and refresh of item definitions.) bool LoadItemDefinitions() { - PRINT_DEBUG("LoadItemDefinitions\n"); + PRINT_DEBUG("Steam_Inventory::LoadItemDefinitions\n"); std::lock_guard lock(global_mutex); if (!item_definitions_loaded) { @@ -643,12 +643,12 @@ bool GetItemDefinitionIDs( STEAM_OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs, STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) { - PRINT_DEBUG("GetItemDefinitionIDs %p\n", pItemDefIDs); + PRINT_DEBUG("Steam_Inventory::GetItemDefinitionIDs %p\n", pItemDefIDs); std::lock_guard lock(global_mutex); if (!punItemDefIDsArraySize) return false; - PRINT_DEBUG("array_size %u\n", *punItemDefIDsArraySize); + PRINT_DEBUG(" array_size %u\n", *punItemDefIDsArraySize); if (!item_definitions_loaded) return false; @@ -681,7 +681,7 @@ bool GetItemDefinitionIDs( bool GetItemDefinitionProperty( SteamItemDef_t iDefinition, const char *pchPropertyName, STEAM_OUT_STRING_COUNT(punValueBufferSizeOut) char *pchValueBuffer, uint32 *punValueBufferSizeOut ) { - PRINT_DEBUG("GetItemDefinitionProperty %i %s\n", iDefinition, pchPropertyName); + PRINT_DEBUG("Steam_Inventory::GetItemDefinitionProperty %i %s\n", iDefinition, pchPropertyName); std::lock_guard lock(global_mutex); auto item = defined_items.find(std::to_string(iDefinition)); @@ -703,7 +703,7 @@ bool GetItemDefinitionProperty( SteamItemDef_t iDefinition, const char *pchPrope { pchPropertyName = ""; *punValueBufferSizeOut = 0; - PRINT_DEBUG("Error, item: %d, attr: %s is not a string!", iDefinition, pchPropertyName); + PRINT_DEBUG(" Error, item: %d, attr: %s is not a string!", iDefinition, pchPropertyName); return true; } if (pchValueBuffer != nullptr) @@ -728,7 +728,7 @@ bool GetItemDefinitionProperty( SteamItemDef_t iDefinition, const char *pchPrope else { *punValueBufferSizeOut = 0; - PRINT_DEBUG("Attr %s not found for item %d\n", pchPropertyName, iDefinition); + PRINT_DEBUG(" Attr %s not found for item %d\n", pchPropertyName, iDefinition); return false; } } @@ -779,7 +779,7 @@ bool GetItemDefinitionProperty( SteamItemDef_t iDefinition, const char *pchPrope STEAM_CALL_RESULT( SteamInventoryEligiblePromoItemDefIDs_t ) SteamAPICall_t RequestEligiblePromoItemDefinitionsIDs( CSteamID steamID ) { - PRINT_DEBUG("RequestEligiblePromoItemDefinitionsIDs\n"); + PRINT_DEBUG("Steam_Inventory::RequestEligiblePromoItemDefinitionsIDs\n"); return 0; } @@ -792,7 +792,7 @@ bool GetEligiblePromoItemDefinitionIDs( STEAM_OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs, STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) { - PRINT_DEBUG("GetEligiblePromoItemDefinitionIDs\n"); + PRINT_DEBUG("Steam_Inventory::GetEligiblePromoItemDefinitionIDs\n"); return false; } @@ -805,7 +805,7 @@ bool GetEligiblePromoItemDefinitionIDs( STEAM_CALL_RESULT( SteamInventoryStartPurchaseResult_t ) SteamAPICall_t StartPurchase( STEAM_ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, STEAM_ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) { - PRINT_DEBUG("StartPurchase\n"); + PRINT_DEBUG("Steam_Inventory::StartPurchase\n"); return 0; } @@ -814,7 +814,7 @@ SteamAPICall_t StartPurchase( STEAM_ARRAY_COUNT(unArrayLength) const SteamItemDe STEAM_CALL_RESULT( SteamInventoryRequestPricesResult_t ) SteamAPICall_t RequestPrices() { - PRINT_DEBUG("RequestPrices\n"); + PRINT_DEBUG("Steam_Inventory::RequestPrices\n"); SteamInventoryRequestPricesResult_t data; data.m_result = k_EResultOK; memcpy(data.m_rgchCurrency, "USD", 4); @@ -825,7 +825,7 @@ SteamAPICall_t RequestPrices() // Returns the number of items with prices. Need to call RequestPrices() first. uint32 GetNumItemsWithPrices() { - PRINT_DEBUG("GetNumItemsWithPrices\n"); + PRINT_DEBUG("Steam_Inventory::GetNumItemsWithPrices\n"); return 0; } @@ -834,7 +834,7 @@ bool GetItemsWithPrices( STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT( STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64 *pBasePrices, uint32 unArrayLength ) { - PRINT_DEBUG("GetItemsWithPrices\n"); + PRINT_DEBUG("Steam_Inventory::GetItemsWithPrices\n"); return false; } @@ -844,13 +844,13 @@ bool GetItemsWithPrices( STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT( STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64 *pPrices, uint32 unArrayLength ) { - PRINT_DEBUG("GetItemsWithPrices old\n"); + PRINT_DEBUG("Steam_Inventory::GetItemsWithPrices old\n"); return GetItemsWithPrices(pArrayItemDefs, pPrices, NULL, unArrayLength); } bool GetItemPrice( SteamItemDef_t iDefinition, uint64 *pCurrentPrice, uint64 *pBasePrice ) { - PRINT_DEBUG("GetItemPrice\n"); + PRINT_DEBUG("Steam_Inventory::GetItemPrice\n"); return false; } @@ -858,7 +858,7 @@ bool GetItemPrice( SteamItemDef_t iDefinition, uint64 *pCurrentPrice, uint64 *pB // Returns false if there is no price stored for the item definition. bool GetItemPrice( SteamItemDef_t iDefinition, uint64 *pPrice ) { - PRINT_DEBUG("GetItemPrice old\n"); + PRINT_DEBUG("Steam_Inventory::GetItemPrice old\n"); return GetItemPrice(iDefinition, pPrice, NULL); } @@ -866,52 +866,52 @@ bool GetItemPrice( SteamItemDef_t iDefinition, uint64 *pPrice ) // Create a request to update properties on items SteamInventoryUpdateHandle_t StartUpdateProperties() { - PRINT_DEBUG("StartUpdateProperties\n"); + PRINT_DEBUG("Steam_Inventory::StartUpdateProperties\n"); return 0; } // Remove the property on the item bool RemoveProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName ) { - PRINT_DEBUG("RemoveProperty\n"); + PRINT_DEBUG("Steam_Inventory::RemoveProperty\n"); return false; } // Accessor methods to set properties on items bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, const char *pchPropertyValue ) { - PRINT_DEBUG("SetProperty\n"); + PRINT_DEBUG("Steam_Inventory::SetProperty\n"); return false; } bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, bool bValue ) { - PRINT_DEBUG("SetProperty\n"); + PRINT_DEBUG("Steam_Inventory::SetProperty\n"); return false; } bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, int64 nValue ) { - PRINT_DEBUG("SetProperty\n"); + PRINT_DEBUG("Steam_Inventory::SetProperty\n"); return false; } bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, float flValue ) { - PRINT_DEBUG("SetProperty\n"); + PRINT_DEBUG("Steam_Inventory::SetProperty\n"); return false; } // Submit the update request by handle bool SubmitUpdateProperties( SteamInventoryUpdateHandle_t handle, SteamInventoryResult_t * pResultHandle ) { - PRINT_DEBUG("SubmitUpdateProperties\n"); + PRINT_DEBUG("Steam_Inventory::SubmitUpdateProperties\n"); return false; } bool InspectItem( SteamInventoryResult_t *pResultHandle, const char *pchItemToken ) { - PRINT_DEBUG("InspectItem\n"); + PRINT_DEBUG("Steam_Inventory::InspectItem\n"); return false; } diff --git a/dll/dll/steam_matchmaking.h b/dll/dll/steam_matchmaking.h index 6f98f2bd..ad9066e7 100644 --- a/dll/dll/steam_matchmaking.h +++ b/dll/dll/steam_matchmaking.h @@ -123,11 +123,11 @@ Lobby *get_lobby(CSteamID id) void send_lobby_data() { - PRINT_DEBUG("Sending lobbies %zu\n", lobbies.size()); + PRINT_DEBUG("Steam_MatchMaking::Sending lobbies %zu\n", lobbies.size()); for(auto & l: lobbies) { if (get_lobby_member(&l, settings->get_local_steam_id()) && l.owner() == settings->get_local_steam_id().ConvertToUint64() && !l.deleted()) { - PRINT_DEBUG("Sending lobby " "%" PRIu64 "\n", l.room_id()); + PRINT_DEBUG("Steam_MatchMaking::Sending lobby " "%" PRIu64 "\n", l.room_id()); Common_Message msg = Common_Message(); msg.set_source_id(settings->get_local_steam_id().ConvertToUint64()); msg.set_allocated_lobby(new Lobby(l)); @@ -138,7 +138,7 @@ void send_lobby_data() void trigger_lobby_dataupdate(CSteamID lobby, CSteamID member, bool success, double cb_timeout=0.005, bool send_changed_lobby=true) { - PRINT_DEBUG("Lobby dataupdate %llu %llu\n", lobby.ConvertToUint64(), member.ConvertToUint64()); + PRINT_DEBUG("Steam_MatchMaking::Lobby dataupdate %llu %llu\n", lobby.ConvertToUint64(), member.ConvertToUint64()); LobbyDataUpdate_t data; memset(&data, 0, sizeof(data)); @@ -264,7 +264,7 @@ void remove_lobbies() auto g = std::begin(lobbies); while (g != std::end(lobbies)) { if (g->members().size() == 0 || (g->deleted() && (g->time_deleted() + LOBBY_DELETED_TIMEOUT < current_time))) { - PRINT_DEBUG("REMOVING LOBBY " "%" PRIu64 "\n", g->room_id()); + PRINT_DEBUG("Steam_MatchMaking::REMOVING LOBBY " "%" PRIu64 "\n", g->room_id()); self_lobby_member_data.erase(g->room_id()); g = lobbies.erase(g); } else { @@ -289,7 +289,7 @@ void on_self_enter_leave_lobby(CSteamID id, int type, bool leaving) public: static void steam_matchmaking_callback(void *object, Common_Message *msg) { - PRINT_DEBUG("steam_matchmaking_callback\n"); + PRINT_DEBUG("Steam_MatchMaking::steam_matchmaking_callback\n"); Steam_Matchmaking *steam_matchmaking = (Steam_Matchmaking *)object; steam_matchmaking->Callback(msg); @@ -297,7 +297,7 @@ static void steam_matchmaking_callback(void *object, Common_Message *msg) static void steam_matchmaking_run_every_runcb(void *object) { - PRINT_DEBUG("steam_matchmaking_run_every_runcb\n"); + PRINT_DEBUG("Steam_MatchMaking::steam_matchmaking_run_every_runcb\n"); Steam_Matchmaking *steam_matchmaking = (Steam_Matchmaking *)object; steam_matchmaking->RunCallbacks(); @@ -342,7 +342,7 @@ static Lobby_Member *get_lobby_member(Lobby *lobby, CSteamID user_id) // returns the number of favorites servers the user has stored int GetFavoriteGameCount() { - PRINT_DEBUG("GetFavoriteGameCount\n"); + PRINT_DEBUG("Steam_MatchMaking::GetFavoriteGameCount\n"); std::string file_path = Local_Storage::get_user_appdata_path() + "/7/" + Local_Storage::remote_storage_folder + "/serverbrowser_favorites.txt"; unsigned long long file_size = file_size_(file_path); if (file_size) { @@ -364,7 +364,7 @@ int GetFavoriteGameCount() // *pRTime32LastPlayedOnServer is filled in the with the Unix time the favorite was added bool GetFavoriteGame( int iGame, AppId_t *pnAppID, uint32 *pnIP, uint16 *pnConnPort, uint16 *pnQueryPort, uint32 *punFlags, uint32 *pRTime32LastPlayedOnServer ) { - PRINT_DEBUG("GetFavoriteGame\n"); + PRINT_DEBUG("Steam_MatchMaking::GetFavoriteGame\n"); return false; } @@ -372,7 +372,7 @@ bool GetFavoriteGame( int iGame, AppId_t *pnAppID, uint32 *pnIP, uint16 *pnConnP // adds the game server to the local list; updates the time played of the server if it already exists in the list int AddFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer ) { - PRINT_DEBUG("AddFavoriteGame %u %u %hu %hu %u %u\n", nAppID, nIP, nConnPort, nQueryPort, unFlags, rTime32LastPlayedOnServer); + PRINT_DEBUG("Steam_MatchMaking::AddFavoriteGame %u %u %hu %hu %u %u\n", nAppID, nIP, nConnPort, nQueryPort, unFlags, rTime32LastPlayedOnServer); std::string file_path; unsigned long long file_size; @@ -445,7 +445,7 @@ int AddFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQuery // removes the game server from the local storage; returns true if one was removed bool RemoveFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags ) { - PRINT_DEBUG("RemoveFavoriteGame\n"); + PRINT_DEBUG("Steam_MatchMaking::RemoveFavoriteGame\n"); std::string file_path; unsigned long long file_size; @@ -530,7 +530,7 @@ bool RemoveFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQ STEAM_CALL_RESULT( LobbyMatchList_t ) SteamAPICall_t RequestLobbyList() { - PRINT_DEBUG("RequestLobbyList\n"); + PRINT_DEBUG("Steam_MatchMaking::RequestLobbyList\n"); std::lock_guard lock(global_mutex); filtered_lobbies.clear(); lobby_last_search = std::chrono::high_resolution_clock::now(); @@ -558,7 +558,7 @@ void RequestLobbyList_OLD() // these are cleared on each call to RequestLobbyList() void AddRequestLobbyListStringFilter( const char *pchKeyToMatch, const char *pchValueToMatch, ELobbyComparison eComparisonType ) { - PRINT_DEBUG("AddRequestLobbyListStringFilter %s %s %i\n", pchKeyToMatch, pchValueToMatch, eComparisonType); + PRINT_DEBUG("Steam_MatchMaking::AddRequestLobbyListStringFilter %s %s %i\n", pchKeyToMatch, pchValueToMatch, eComparisonType); if (!pchValueToMatch) return; std::lock_guard lock(global_mutex); @@ -574,7 +574,7 @@ void AddRequestLobbyListStringFilter( const char *pchKeyToMatch, const char *pch // numerical comparison void AddRequestLobbyListNumericalFilter( const char *pchKeyToMatch, int nValueToMatch, ELobbyComparison eComparisonType ) { - PRINT_DEBUG("AddRequestLobbyListNumericalFilter %s %i %i\n", pchKeyToMatch, nValueToMatch, eComparisonType); + PRINT_DEBUG("Steam_MatchMaking::AddRequestLobbyListNumericalFilter %s %i %i\n", pchKeyToMatch, nValueToMatch, eComparisonType); std::lock_guard lock(global_mutex); struct Filter_Values fv; fv.key = std::string(pchKeyToMatch); @@ -588,7 +588,7 @@ void AddRequestLobbyListNumericalFilter( const char *pchKeyToMatch, int nValueTo // returns results closest to the specified value. Multiple near filters can be added, with early filters taking precedence void AddRequestLobbyListNearValueFilter( const char *pchKeyToMatch, int nValueToBeCloseTo ) { - PRINT_DEBUG("AddRequestLobbyListNearValueFilter %s %u\n", pchKeyToMatch, nValueToBeCloseTo); + PRINT_DEBUG("Steam_MatchMaking::AddRequestLobbyListNearValueFilter %s %u\n", pchKeyToMatch, nValueToBeCloseTo); std::lock_guard lock(global_mutex); @@ -597,7 +597,7 @@ void AddRequestLobbyListNearValueFilter( const char *pchKeyToMatch, int nValueTo // returns only lobbies with the specified number of slots available void AddRequestLobbyListFilterSlotsAvailable( int nSlotsAvailable ) { - PRINT_DEBUG("AddRequestLobbyListFilterSlotsAvailable %i\n", nSlotsAvailable); + PRINT_DEBUG("Steam_MatchMaking::AddRequestLobbyListFilterSlotsAvailable %i\n", nSlotsAvailable); std::lock_guard lock(global_mutex); @@ -606,7 +606,7 @@ void AddRequestLobbyListFilterSlotsAvailable( int nSlotsAvailable ) // sets the distance for which we should search for lobbies (based on users IP address to location map on the Steam backed) void AddRequestLobbyListDistanceFilter( ELobbyDistanceFilter eLobbyDistanceFilter ) { - PRINT_DEBUG("AddRequestLobbyListDistanceFilter %i\n", eLobbyDistanceFilter); + PRINT_DEBUG("Steam_MatchMaking::AddRequestLobbyListDistanceFilter %i\n", eLobbyDistanceFilter); std::lock_guard lock(global_mutex); @@ -615,7 +615,7 @@ void AddRequestLobbyListDistanceFilter( ELobbyDistanceFilter eLobbyDistanceFilte // sets how many results to return, the lower the count the faster it is to download the lobby results & details to the client void AddRequestLobbyListResultCountFilter( int cMaxResults ) { - PRINT_DEBUG("AddRequestLobbyListResultCountFilter %i\n", cMaxResults); + PRINT_DEBUG("Steam_MatchMaking::AddRequestLobbyListResultCountFilter %i\n", cMaxResults); std::lock_guard lock(global_mutex); filter_max_results = cMaxResults; @@ -624,7 +624,7 @@ void AddRequestLobbyListResultCountFilter( int cMaxResults ) void AddRequestLobbyListCompatibleMembersFilter( CSteamID steamIDLobby ) { - PRINT_DEBUG("AddRequestLobbyListCompatibleMembersFilter\n"); + PRINT_DEBUG("Steam_MatchMaking::AddRequestLobbyListCompatibleMembersFilter\n"); std::lock_guard lock(global_mutex); @@ -651,11 +651,11 @@ void AddRequestLobbyListSlotsAvailableFilter() // the returned CSteamID::IsValid() will be false if iLobby is out of range CSteamID GetLobbyByIndex( int iLobby ) { - PRINT_DEBUG("GetLobbyByIndex %i\n", iLobby); + PRINT_DEBUG("Steam_MatchMaking::GetLobbyByIndex %i\n", iLobby); std::lock_guard lock(global_mutex); CSteamID id = k_steamIDNil; if (0 <= iLobby && iLobby < filtered_lobbies.size()) id = filtered_lobbies[iLobby]; - PRINT_DEBUG("Lobby %llu\n", id.ConvertToUint64()); + PRINT_DEBUG(" Lobby %llu\n", id.ConvertToUint64()); return id; } @@ -743,7 +743,7 @@ void Create_pending_lobbies() STEAM_CALL_RESULT( LobbyCreated_t ) SteamAPICall_t CreateLobby( ELobbyType eLobbyType, int cMaxMembers ) { - PRINT_DEBUG("CreateLobby type: %i max_members: %i\n", eLobbyType, cMaxMembers); + PRINT_DEBUG("Steam_MatchMaking::CreateLobby type: %i max_members: %i\n", eLobbyType, cMaxMembers); std::lock_guard lock(global_mutex); struct Pending_Creates p_c; p_c.api_id = callback_results->reserveCallResult(); @@ -776,7 +776,7 @@ void CreateLobby( bool bPrivate ) STEAM_CALL_RESULT( LobbyEnter_t ) SteamAPICall_t JoinLobby( CSteamID steamIDLobby ) { - PRINT_DEBUG("JoinLobby %llu\n", steamIDLobby.ConvertToUint64()); + PRINT_DEBUG("Steam_MatchMaking::JoinLobby %llu\n", steamIDLobby.ConvertToUint64()); std::lock_guard lock(global_mutex); auto pj = std::find_if(pending_joins.begin(), pending_joins.end(), [&steamIDLobby](Pending_Joins const& item) {return item.lobby_id == steamIDLobby;}); @@ -804,22 +804,22 @@ void JoinLobby_OLD( CSteamID steamIDLobby ) // other users in the lobby will be notified by a LobbyChatUpdate_t callback void LeaveLobby( CSteamID steamIDLobby ) { - PRINT_DEBUG("LeaveLobby\n"); + PRINT_DEBUG("Steam_MatchMaking::LeaveLobby\n"); std::lock_guard lock(global_mutex); - PRINT_DEBUG("LeaveLobby pass mutex\n"); + PRINT_DEBUG("Steam_MatchMaking::LeaveLobby pass mutex\n"); Lobby *lobby = get_lobby(steamIDLobby); if (lobby) { if (!lobby->deleted()) { on_self_enter_leave_lobby((uint64)lobby->room_id(), lobby->type(), true); self_lobby_member_data.erase(lobby->room_id()); if (lobby->owner() != settings->get_local_steam_id().ConvertToUint64()) { - PRINT_DEBUG("LeaveLobby not owner\n"); + PRINT_DEBUG("Steam_MatchMaking::LeaveLobby not owner\n"); leave_lobby(&(*lobby), settings->get_local_steam_id()); Lobby_Messages *message = new Lobby_Messages(); message->set_type(Lobby_Messages::LEAVE); send_owner_packet(steamIDLobby, message); } else { - PRINT_DEBUG("LeaveLobby owner\n"); + PRINT_DEBUG("Steam_MatchMaking::LeaveLobby owner\n"); Lobby_Messages *message = new Lobby_Messages(); message->set_type(Lobby_Messages::LEAVE); @@ -836,7 +836,7 @@ void LeaveLobby( CSteamID steamIDLobby ) } } - PRINT_DEBUG("LeaveLobby Done\n"); + PRINT_DEBUG("Steam_MatchMaking::LeaveLobby Done\n"); } @@ -849,7 +849,7 @@ void LeaveLobby( CSteamID steamIDLobby ) // or if the game isn't running yet the game will be launched with the parameter +connect_lobby <64-bit lobby id> bool InviteUserToLobby( CSteamID steamIDLobby, CSteamID steamIDInvitee ) { - PRINT_DEBUG("InviteUserToLobby\n"); + PRINT_DEBUG("Steam_MatchMaking::InviteUserToLobby\n"); std::lock_guard lock(global_mutex); Lobby *lobby = get_lobby(steamIDLobby); if (!lobby) return false; @@ -873,13 +873,13 @@ bool InviteUserToLobby( CSteamID steamIDLobby, CSteamID steamIDInvitee ) // returns the number of users in the specified lobby int GetNumLobbyMembers( CSteamID steamIDLobby ) { - PRINT_DEBUG("GetNumLobbyMembers %llu\n", steamIDLobby.ConvertToUint64()); + PRINT_DEBUG("Steam_MatchMaking::GetNumLobbyMembers %llu\n", steamIDLobby.ConvertToUint64()); std::lock_guard lock(global_mutex); Lobby *lobby = get_lobby(steamIDLobby); int ret = 0; if (lobby) ret = lobby->members().size(); - PRINT_DEBUG("Number: %i\n", ret); + PRINT_DEBUG("Steam_MatchMaking::GetNumLobbyMembers Number: %i\n", ret); return ret; } @@ -888,12 +888,12 @@ int GetNumLobbyMembers( CSteamID steamIDLobby ) // note that the current user must be in a lobby to retrieve CSteamIDs of other users in that lobby CSteamID GetLobbyMemberByIndex( CSteamID steamIDLobby, int iMember ) { - PRINT_DEBUG("GetLobbyMemberByIndex %llu %i\n", steamIDLobby.ConvertToUint64(), iMember); + PRINT_DEBUG("Steam_MatchMaking::GetLobbyMemberByIndex %llu %i\n", steamIDLobby.ConvertToUint64(), iMember); std::lock_guard lock(global_mutex); Lobby *lobby = get_lobby(steamIDLobby); CSteamID id = k_steamIDNil; if (lobby && !lobby->deleted() && lobby->members().size() > iMember && iMember >= 0) id = (uint64)lobby->members(iMember).id(); - PRINT_DEBUG("Member: %llu\n", id.ConvertToUint64()); + PRINT_DEBUG("Steam_MatchMaking::GetLobbyMemberByIndex Member: %llu\n", id.ConvertToUint64()); return id; } @@ -903,7 +903,7 @@ CSteamID GetLobbyMemberByIndex( CSteamID steamIDLobby, int iMember ) // "" will be returned if no value is set, or if steamIDLobby is invalid const char *GetLobbyData( CSteamID steamIDLobby, const char *pchKey ) { - PRINT_DEBUG("GetLobbyData %llu %s\n", steamIDLobby.ConvertToUint64(), pchKey); + PRINT_DEBUG("Steam_MatchMaking::GetLobbyData %llu %s\n", steamIDLobby.ConvertToUint64(), pchKey); if (!pchKey) return ""; std::lock_guard lock(global_mutex); Lobby *lobby = get_lobby(steamIDLobby); @@ -913,7 +913,7 @@ const char *GetLobbyData( CSteamID steamIDLobby, const char *pchKey ) if (result != lobby->values().end()) ret = result->second.c_str(); } - PRINT_DEBUG("returned %s\n", ret); + PRINT_DEBUG("Steam_MatchMaking::GetLobbyData returned %s\n", ret); return ret; } @@ -924,7 +924,7 @@ const char *GetLobbyData( CSteamID steamIDLobby, const char *pchKey ) // other users in the lobby will receive notification of the lobby data change via a LobbyDataUpdate_t callback bool SetLobbyData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) { - PRINT_DEBUG("SetLobbyData %llu %s %s\n", steamIDLobby.ConvertToUint64(), pchKey, pchValue); + PRINT_DEBUG("Steam_MatchMaking::SetLobbyData %llu %s %s\n", steamIDLobby.ConvertToUint64(), pchKey, pchValue); if (!pchKey) return false; char empty_string[] = ""; if (!pchValue) pchValue = empty_string; @@ -957,7 +957,7 @@ bool SetLobbyData( CSteamID steamIDLobby, const char *pchKey, const char *pchVal // returns the number of metadata keys set on the specified lobby int GetLobbyDataCount( CSteamID steamIDLobby ) { - PRINT_DEBUG("GetLobbyDataCount\n"); + PRINT_DEBUG("Steam_MatchMaking::GetLobbyDataCount\n"); std::lock_guard lock(global_mutex); Lobby *lobby = get_lobby(steamIDLobby); int size = 0; @@ -971,7 +971,7 @@ int GetLobbyDataCount( CSteamID steamIDLobby ) // returns a lobby metadata key/values pair by index, of range [0, GetLobbyDataCount()) bool GetLobbyDataByIndex( CSteamID steamIDLobby, int iLobbyData, char *pchKey, int cchKeyBufferSize, char *pchValue, int cchValueBufferSize ) { - PRINT_DEBUG("GetLobbyDataByIndex\n"); + PRINT_DEBUG("Steam_MatchMaking::GetLobbyDataByIndex\n"); std::lock_guard lock(global_mutex); Lobby *lobby = get_lobby(steamIDLobby); bool ret = false; @@ -985,7 +985,7 @@ bool GetLobbyDataByIndex( CSteamID steamIDLobby, int iLobbyData, char *pchKey, i if (cchValueBufferSize) strncpy(pchValue, lobby_data->second.c_str(), cchValueBufferSize - 1); pchValue[cchValueBufferSize - 1] = 0; - PRINT_DEBUG("GetLobbyDataByIndex ret %s %s\n", pchKey, pchValue); + PRINT_DEBUG("Steam_MatchMaking::GetLobbyDataByIndex ret %s %s\n", pchKey, pchValue); ret = true; } @@ -997,7 +997,7 @@ bool GetLobbyDataByIndex( CSteamID steamIDLobby, int iLobbyData, char *pchKey, i // removes a metadata key from the lobby bool DeleteLobbyData( CSteamID steamIDLobby, const char *pchKey ) { - PRINT_DEBUG("DeleteLobbyData\n"); + PRINT_DEBUG("Steam_MatchMaking::DeleteLobbyData\n"); std::lock_guard lock(global_mutex); Lobby *lobby = get_lobby(steamIDLobby); if (!lobby || lobby->owner() != settings->get_local_steam_id().ConvertToUint64() || lobby->deleted()) { @@ -1014,7 +1014,7 @@ bool DeleteLobbyData( CSteamID steamIDLobby, const char *pchKey ) // Gets per-user metadata for someone in this lobby const char *GetLobbyMemberData( CSteamID steamIDLobby, CSteamID steamIDUser, const char *pchKey ) { - PRINT_DEBUG("GetLobbyMemberData %s %llu %llu\n", pchKey, steamIDLobby.ConvertToUint64(), steamIDUser.ConvertToUint64()); + PRINT_DEBUG("Steam_MatchMaking::GetLobbyMemberData %s %llu %llu\n", pchKey, steamIDLobby.ConvertToUint64(), steamIDUser.ConvertToUint64()); if (!pchKey) return ""; std::lock_guard lock(global_mutex); struct Lobby_Member *member = get_lobby_member(get_lobby(steamIDLobby), steamIDUser); @@ -1035,14 +1035,14 @@ const char *GetLobbyMemberData( CSteamID steamIDLobby, CSteamID steamIDUser, con } } - PRINT_DEBUG("GetLobbyMemberData res %s\n", ret); + PRINT_DEBUG("Steam_MatchMaking::GetLobbyMemberData res %s\n", ret); return ret; } // Sets per-user metadata (for the local user implicitly) void SetLobbyMemberData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) { - PRINT_DEBUG("SetLobbyMemberData %s %s\n", pchKey, pchValue); + PRINT_DEBUG("Steam_MatchMaking::SetLobbyMemberData %s %s\n", pchKey, pchValue); if (!pchKey) return; char empty_string[] = ""; if (!pchValue) pchValue = empty_string; @@ -1092,7 +1092,7 @@ void SetLobbyMemberData( CSteamID steamIDLobby, const char *pchKey, const char * // if pvMsgBody is text, cubMsgBody should be strlen( text ) + 1, to include the null terminator bool SendLobbyChatMsg( CSteamID steamIDLobby, const void *pvMsgBody, int cubMsgBody ) { - PRINT_DEBUG("SendLobbyChatMsg %i\n", cubMsgBody); + PRINT_DEBUG("Steam_MatchMaking::SendLobbyChatMsg %i\n", cubMsgBody); std::lock_guard lock(global_mutex); Lobby *lobby = get_lobby(steamIDLobby); if (!lobby || lobby->deleted()) return false; @@ -1110,7 +1110,7 @@ bool SendLobbyChatMsg( CSteamID steamIDLobby, const void *pvMsgBody, int cubMsgB // return value is the number of bytes written into the buffer int GetLobbyChatEntry( CSteamID steamIDLobby, int iChatID, STEAM_OUT_STRUCT() CSteamID *pSteamIDUser, void *pvData, int cubData, EChatEntryType *peChatEntryType ) { - PRINT_DEBUG("GetLobbyChatEntry %llu %i %p %p %i %p\n", steamIDLobby.ConvertToUint64(), iChatID, pSteamIDUser, pvData, cubData, peChatEntryType); + PRINT_DEBUG("Steam_MatchMaking::GetLobbyChatEntry %llu %i %p %p %i %p\n", steamIDLobby.ConvertToUint64(), iChatID, pSteamIDUser, pvData, cubData, peChatEntryType); std::lock_guard lock(global_mutex); if (iChatID >= chat_entries.size() || iChatID < 0 || cubData < 0) return 0; if (chat_entries[iChatID].lobby_id != steamIDLobby) return 0; @@ -1120,7 +1120,7 @@ int GetLobbyChatEntry( CSteamID steamIDLobby, int iChatID, STEAM_OUT_STRUCT() CS if (chat_entries[iChatID].message.size() <= cubData) { cubData = chat_entries[iChatID].message.size(); memcpy(pvData, chat_entries[iChatID].message.data(), cubData); - PRINT_DEBUG("Returned chat of len: %i\n", cubData); + PRINT_DEBUG(" Returned chat of len: %i\n", cubData); return cubData; } } @@ -1138,7 +1138,7 @@ int GetLobbyChatEntry( CSteamID steamIDLobby, int iChatID, STEAM_OUT_STRUCT() CS // if the specified lobby doesn't exist, LobbyDataUpdate_t::m_bSuccess will be set to false bool RequestLobbyData( CSteamID steamIDLobby ) { - PRINT_DEBUG("RequestLobbyData\n"); + PRINT_DEBUG("Steam_MatchMaking::RequestLobbyData\n"); std::lock_guard lock(global_mutex); struct Data_Requested requested; requested.lobby_id = steamIDLobby; @@ -1152,7 +1152,7 @@ bool RequestLobbyData( CSteamID steamIDLobby ) // either the IP/Port or the steamID of the game server has to be valid, depending on how you want the clients to be able to connect void SetLobbyGameServer( CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer ) { - PRINT_DEBUG("SetLobbyGameServer %llu %llu %hhu.%hhu.%hhu.%hhu:%hu\n", steamIDLobby.ConvertToUint64(), steamIDGameServer.ConvertToUint64(), ((unsigned char *)&unGameServerIP)[3], ((unsigned char *)&unGameServerIP)[2], ((unsigned char *)&unGameServerIP)[1], ((unsigned char *)&unGameServerIP)[0], unGameServerPort); + PRINT_DEBUG("Steam_MatchMaking::SetLobbyGameServer %llu %llu %hhu.%hhu.%hhu.%hhu:%hu\n", steamIDLobby.ConvertToUint64(), steamIDGameServer.ConvertToUint64(), ((unsigned char *)&unGameServerIP)[3], ((unsigned char *)&unGameServerIP)[2], ((unsigned char *)&unGameServerIP)[1], ((unsigned char *)&unGameServerIP)[0], unGameServerPort); std::lock_guard lock(global_mutex); Lobby *lobby = get_lobby(steamIDLobby); if (lobby) { @@ -1173,7 +1173,7 @@ void SetLobbyGameServer( CSteamID steamIDLobby, uint32 unGameServerIP, uint16 un // returns the details of a game server set in a lobby - returns false if there is no game server set, or that lobby doesn't exist bool GetLobbyGameServer( CSteamID steamIDLobby, uint32 *punGameServerIP, uint16 *punGameServerPort, STEAM_OUT_STRUCT() CSteamID *psteamIDGameServer ) { - PRINT_DEBUG("GetLobbyGameServer\n"); + PRINT_DEBUG("Steam_MatchMaking::GetLobbyGameServer\n"); std::lock_guard lock(global_mutex); Lobby *lobby = get_lobby(steamIDLobby); if (!lobby) { @@ -1198,7 +1198,7 @@ bool GetLobbyGameServer( CSteamID steamIDLobby, uint32 *punGameServerIP, uint16 // set the limit on the # of users who can join the lobby bool SetLobbyMemberLimit( CSteamID steamIDLobby, int cMaxMembers ) { - PRINT_DEBUG("SetLobbyMemberLimit\n"); + PRINT_DEBUG("Steam_MatchMaking::SetLobbyMemberLimit\n"); std::lock_guard lock(global_mutex); Lobby *lobby = get_lobby(steamIDLobby); if (!lobby || lobby->owner() != settings->get_local_steam_id().ConvertToUint64() || lobby->deleted()) { @@ -1215,26 +1215,26 @@ bool SetLobbyMemberLimit( CSteamID steamIDLobby, int cMaxMembers ) // returns the current limit on the # of users who can join the lobby; returns 0 if no limit is defined int GetLobbyMemberLimit( CSteamID steamIDLobby ) { - PRINT_DEBUG("GetLobbyMemberLimit\n"); + PRINT_DEBUG("Steam_MatchMaking::GetLobbyMemberLimit\n"); std::lock_guard lock(global_mutex); Lobby *lobby = get_lobby(steamIDLobby); int limit = 0; if (lobby) limit = lobby->member_limit(); - PRINT_DEBUG("limit %i\n", limit); + PRINT_DEBUG(" limit %i\n", limit); return limit; } void SetLobbyVoiceEnabled( CSteamID steamIDLobby, bool bVoiceEnabled ) { - PRINT_DEBUG("SetLobbyVoiceEnabled\n"); + PRINT_DEBUG("Steam_MatchMaking::SetLobbyVoiceEnabled\n"); } // updates which type of lobby it is // only lobbies that are k_ELobbyTypePublic or k_ELobbyTypeInvisible, and are set to joinable, will be returned by RequestLobbyList() calls bool SetLobbyType( CSteamID steamIDLobby, ELobbyType eLobbyType ) { - PRINT_DEBUG("SetLobbyType %i\n", eLobbyType); + PRINT_DEBUG("Steam_MatchMaking::SetLobbyType %i\n", eLobbyType); std::lock_guard lock(global_mutex); Lobby *lobby = get_lobby(steamIDLobby); if (!lobby || lobby->owner() != settings->get_local_steam_id().ConvertToUint64() || lobby->deleted()) { @@ -1258,7 +1258,7 @@ bool SetLobbyType( CSteamID steamIDLobby, ELobbyType eLobbyType ) // if set to false, no user can join, even if they are a friend or have been invited bool SetLobbyJoinable( CSteamID steamIDLobby, bool bLobbyJoinable ) { - PRINT_DEBUG("SetLobbyJoinable %u\n", bLobbyJoinable); + PRINT_DEBUG("Steam_MatchMaking::SetLobbyJoinable %u\n", bLobbyJoinable); std::lock_guard lock(global_mutex); Lobby *lobby = get_lobby(steamIDLobby); if (!lobby || lobby->owner() != settings->get_local_steam_id().ConvertToUint64() || lobby->deleted()) { @@ -1280,7 +1280,7 @@ bool SetLobbyJoinable( CSteamID steamIDLobby, bool bLobbyJoinable ) // it is possible (bur rare) to join a lobby just as the owner is leaving, thus entering a lobby with self as the owner CSteamID GetLobbyOwner( CSteamID steamIDLobby ) { - PRINT_DEBUG("GetLobbyOwner %llu\n", steamIDLobby.ConvertToUint64()); + PRINT_DEBUG("Steam_MatchMaking::GetLobbyOwner %llu\n", steamIDLobby.ConvertToUint64()); std::lock_guard lock(global_mutex); Lobby *lobby = get_lobby(steamIDLobby); if (!lobby || lobby->deleted()) return k_steamIDNil; @@ -1295,7 +1295,7 @@ CSteamID GetLobbyOwner( CSteamID steamIDLobby ) // filters don't apply to lobbies (currently) bool RequestFriendsLobbies() { - PRINT_DEBUG("RequestFriendsLobbies\n"); + PRINT_DEBUG("Steam_MatchMaking::RequestFriendsLobbies\n"); RequestFriendsLobbiesResponse_t data = {}; callbacks->addCBResult(data.k_iCallback, &data, sizeof(data)); return true; @@ -1303,7 +1303,7 @@ bool RequestFriendsLobbies() float GetLobbyDistance( CSteamID steamIDLobby ) { - PRINT_DEBUG("GetLobbyDistance %llu\n", steamIDLobby.ConvertToUint64()); + PRINT_DEBUG("Steam_MatchMaking::GetLobbyDistance %llu\n", steamIDLobby.ConvertToUint64()); return 0.0; } @@ -1312,7 +1312,7 @@ float GetLobbyDistance( CSteamID steamIDLobby ) // after completion, the local user will no longer be the owner bool SetLobbyOwner( CSteamID steamIDLobby, CSteamID steamIDNewOwner ) { - PRINT_DEBUG("SetLobbyOwner\n"); + PRINT_DEBUG("Steam_MatchMaking::SetLobbyOwner\n"); std::lock_guard lock(global_mutex); Lobby *lobby = get_lobby(steamIDLobby); if (!lobby || lobby->owner() != settings->get_local_steam_id().ConvertToUint64() || lobby->deleted()) return false; @@ -1333,7 +1333,7 @@ bool SetLobbyOwner( CSteamID steamIDLobby, CSteamID steamIDNewOwner ) // you must be the lobby owner of both lobbies bool SetLinkedLobby( CSteamID steamIDLobby, CSteamID steamIDLobbyDependent ) { - PRINT_DEBUG("SetLinkedLobby\n"); + PRINT_DEBUG("Steam_MatchMaking::SetLinkedLobby\n"); return false; } @@ -1353,41 +1353,41 @@ void RunCallbacks() RunBackground(); if (searching) { - PRINT_DEBUG("Searching for lobbies %zu\n", lobbies.size()); + PRINT_DEBUG("Steam_MatchMaking::Searching for lobbies %zu\n", lobbies.size()); for(auto & l: lobbies) { bool use = l.joinable() && (l.type() == k_ELobbyTypePublic || l.type() == k_ELobbyTypeInvisible || l.type() == k_ELobbyTypeFriendsOnly) && !l.deleted(); - PRINT_DEBUG("use lobby: %u, filters: %zu, joinable: %u, type: %u, deleted: %u\n", use, filter_values_copy.size(), l.joinable(), l.type(), l.deleted()); + PRINT_DEBUG("Steam_MatchMaking use lobby: %u, filters: %zu, joinable: %u, type: %u, deleted: %u\n", use, filter_values_copy.size(), l.joinable(), l.type(), l.deleted()); for (auto & f : filter_values_copy) { - PRINT_DEBUG("%s:%s/%i %u %i\n", f.key.c_str(), f.value_string.c_str(), f.value_int, f.is_int, f.eComparisonType); + PRINT_DEBUG("Steam_MatchMaking %s:%s/%i %u %i\n", f.key.c_str(), f.value_string.c_str(), f.value_int, f.is_int, f.eComparisonType); auto value = caseinsensitive_find(l.values(), f.key); if (value != l.values().end()) { //TODO: eComparisonType if (!f.is_int) { - PRINT_DEBUG("Compare Values %s %s\n", value->second.c_str(), f.value_string.c_str()); + PRINT_DEBUG("Steam_MatchMaking Compare Values %s %s\n", value->second.c_str(), f.value_string.c_str()); if (f.eComparisonType == k_ELobbyComparisonEqual) { if (value->second == f.value_string) { - PRINT_DEBUG("Equal\n"); + PRINT_DEBUG("Steam_MatchMaking Equal\n"); //use = use; } else { - PRINT_DEBUG("Not Equal\n"); + PRINT_DEBUG("Steam_MatchMaking Not Equal\n"); use = false; } } } else { try { - PRINT_DEBUG("%s\n", value->second.c_str()); + PRINT_DEBUG("Steam_MatchMaking %s\n", value->second.c_str()); int compare_to = 0; //TODO: check if this is how real steam behaves if (value->second.size()) { compare_to = std::stoll(value->second, 0, 0); } - PRINT_DEBUG("Compare Values %i %i\n", compare_to, f.value_int); + PRINT_DEBUG("Steam_MatchMaking Compare Values %i %i\n", compare_to, f.value_int); if (f.eComparisonType == k_ELobbyComparisonEqual) { if (compare_to == f.value_int) { - PRINT_DEBUG("Equal\n"); + PRINT_DEBUG("Steam_MatchMaking Equal\n"); //use = use; } else { - PRINT_DEBUG("Not Equal\n"); + PRINT_DEBUG("Steam_MatchMaking Not Equal\n"); use = false; } } @@ -1398,7 +1398,7 @@ void RunCallbacks() //TODO: add more comparisons } } else { - PRINT_DEBUG("Compare Key not in lobby\n"); + PRINT_DEBUG("Steam_MatchMaking Compare Key not in lobby\n"); if (f.eComparisonType == k_ELobbyComparisonEqual) { //If the key is not in the lobby do we take it into account? use = false; @@ -1406,7 +1406,7 @@ void RunCallbacks() } } - PRINT_DEBUG("Lobby " "%" PRIu64 " use %u\n", l.room_id(), use); + PRINT_DEBUG("Steam_MatchMaking Lobby " "%" PRIu64 " use %u\n", l.room_id(), use); if (use) PUSH_BACK_IF_NOT_IN(filtered_lobbies, (uint64)l.room_id()); if (filtered_lobbies.size() >= filter_max_results_copy) { searching = false; @@ -1420,7 +1420,7 @@ void RunCallbacks() } if (searching && check_timedout(lobby_last_search, LOBBY_SEARCH_TIMEOUT)) { - PRINT_DEBUG("LOBBY_SEARCH_TIMEOUT %zu\n", filtered_lobbies.size()); + PRINT_DEBUG("Steam_MatchMaking LOBBY_SEARCH_TIMEOUT %zu\n", filtered_lobbies.size()); LobbyMatchList_t data; data.m_nLobbiesMatching = filtered_lobbies.size(); callback_results->addCallResult(search_call_api_id, data.k_iCallback, &data, sizeof(data)); @@ -1432,7 +1432,7 @@ void RunCallbacks() auto g = std::begin(pending_joins); while (g != std::end(pending_joins)) { if (!g->message_sent) { - PRINT_DEBUG("Resend join lobby\n"); + PRINT_DEBUG("Steam_MatchMaking Resend join lobby\n"); Lobby_Messages *message = new Lobby_Messages(); message->set_type(Lobby_Messages::JOIN); g->message_sent = send_owner_packet(g->lobby_id, message); @@ -1471,7 +1471,7 @@ void RunCallbacks() callback_results->addCallResult(g->api_id, data.k_iCallback, &data, sizeof(data)); callbacks->addCBResult(data.k_iCallback, &data, sizeof(data)); g = pending_joins.erase(g); - PRINT_DEBUG("PENDING_JOIN_TIMEOUT\n"); + PRINT_DEBUG("Steam_MatchMaking PENDING_JOIN_TIMEOUT\n"); } else { ++g; } @@ -1501,7 +1501,7 @@ void RunCallbacks() void Callback(Common_Message *msg) { if (msg->has_lobby()) { - PRINT_DEBUG("GOT A LOBBY appid: %u\n", msg->lobby().appid()); + PRINT_DEBUG("Steam_MatchMaking GOT A LOBBY appid: %u\n", msg->lobby().appid()); if (msg->lobby().owner() != settings->get_local_steam_id().ConvertToUint64() && msg->lobby().appid() == settings->get_local_game_id().AppID()) { Lobby *lobby = get_lobby((uint64)msg->lobby().room_id()); if (!lobby) { @@ -1588,24 +1588,24 @@ void Callback(Common_Message *msg) if (msg->has_lobby_messages()) { - PRINT_DEBUG("LOBBY MESSAGE %u " "%" PRIu64 "\n", msg->lobby_messages().type(), msg->lobby_messages().id()); + PRINT_DEBUG("Steam_MatchMaking LOBBY MESSAGE %u " "%" PRIu64 "\n", msg->lobby_messages().type(), msg->lobby_messages().id()); Lobby *lobby = get_lobby((uint64)msg->lobby_messages().id()); if (lobby && !lobby->deleted()) { bool we_are_in_lobby = !!get_lobby_member(lobby, settings->get_local_steam_id()); if (lobby->owner() == settings->get_local_steam_id().ConvertToUint64()) { if (msg->lobby_messages().type() == Lobby_Messages::JOIN) { - PRINT_DEBUG("LOBBY MESSAGE: JOIN\n"); + PRINT_DEBUG("Steam_MatchMaking LOBBY MESSAGE: JOIN\n"); if (enter_lobby(lobby, (uint64)msg->source_id())) { trigger_lobby_member_join_leave((uint64)lobby->room_id(), (uint64)msg->source_id(), false, true, 0.01); } } if (msg->lobby_messages().type() == Lobby_Messages::MEMBER_DATA) { - PRINT_DEBUG("LOBBY MESSAGE: MEMBER_DATA\n"); + PRINT_DEBUG("Steam_MatchMaking LOBBY MESSAGE: MEMBER_DATA\n"); Lobby_Member *member = get_lobby_member(lobby, (uint64)msg->source_id()); if (member) { for (auto const &p : msg->lobby_messages().map()) { - PRINT_DEBUG("member data %s:%s\n", p.first.c_str(), p.second.c_str()); + PRINT_DEBUG("Steam_MatchMaking member data %s:%s\n", p.first.c_str(), p.second.c_str()); auto result = caseinsensitive_find(member->values(), p.first); if (result == member->values().end()) { (*member->mutable_values())[p.first] = p.second; @@ -1620,19 +1620,19 @@ void Callback(Common_Message *msg) } if (msg->lobby_messages().type() == Lobby_Messages::LEAVE) { - PRINT_DEBUG("LOBBY MESSAGE: LEAVE " "%" PRIu64 "\n", msg->source_id()); + PRINT_DEBUG("Steam_MatchMaking LOBBY MESSAGE: LEAVE " "%" PRIu64 "\n", msg->source_id()); leave_lobby(lobby, (uint64)msg->source_id()); if (we_are_in_lobby) trigger_lobby_member_join_leave((uint64)lobby->room_id(), (uint64)msg->source_id(), true, true, 0.2); } if (msg->lobby_messages().type() == Lobby_Messages::CHANGE_OWNER) { - PRINT_DEBUG("LOBBY MESSAGE: CHANGE OWNER\n"); + PRINT_DEBUG("Steam_MatchMaking LOBBY MESSAGE: CHANGE OWNER\n"); lobby->set_owner(msg->lobby_messages().idata()); if (we_are_in_lobby) trigger_lobby_dataupdate((uint64)lobby->room_id(), (uint64)lobby->room_id(), true); } if (msg->lobby_messages().type() == Lobby_Messages::CHAT_MESSAGE) { - PRINT_DEBUG("LOBBY MESSAGE: CHAT MESSAGE\n"); + PRINT_DEBUG("Steam_MatchMaking LOBBY MESSAGE: CHAT MESSAGE\n"); if (we_are_in_lobby) { struct Chat_Entry entry; entry.type = k_EChatEntryTypeChatMsg; diff --git a/dll/dll/steam_tv.h b/dll/dll/steam_tv.h index 6ea7857d..ed14ce60 100644 --- a/dll/dll/steam_tv.h +++ b/dll/dll/steam_tv.h @@ -31,7 +31,7 @@ public ISteamTV public: static void steam_callback(void *object, Common_Message *msg) { - PRINT_DEBUG("steam_tv_callback\n"); + PRINT_DEBUG("TODO Steam_TV::steam_tv_callback\n"); Steam_TV *steam_parties = (Steam_TV *)object; steam_parties->Callback(msg); @@ -65,39 +65,39 @@ Steam_TV(class Settings *settings, class Networking *network, class SteamCallRes bool IsBroadcasting(int *pnNumViewers) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_TV::%s\n", __FUNCTION__); return false; } void AddBroadcastGameData(const char * pchKey, const char * pchValue) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_TV::%s\n", __FUNCTION__); } void RemoveBroadcastGameData(const char * pchKey) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_TV::%s\n", __FUNCTION__); } void AddTimelineMarker(const char * pchTemplateName, bool bPersistent, uint8 nColorR, uint8 nColorG, uint8 nColorB) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_TV::%s\n", __FUNCTION__); } void RemoveTimelineMarker() { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_TV::%s\n", __FUNCTION__); } uint32 AddRegion(const char * pchElementName, const char * pchTimelineDataSection, const SteamTVRegion_t * pSteamTVRegion, ESteamTVRegionBehavior eSteamTVRegionBehavior) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_TV::%s\n", __FUNCTION__); return 0; } void RemoveRegion(uint32 unRegionHandle) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_TV::%s\n", __FUNCTION__); } void RunCallbacks() diff --git a/dll/dll/steam_user.h b/dll/dll/steam_user.h index a8c5349d..c8bd1bf8 100644 --- a/dll/dll/steam_user.h +++ b/dll/dll/steam_user.h @@ -68,7 +68,7 @@ Steam_User(Settings *settings, Local_Storage *local_storage, class Networking *n // this is only used internally by the API, and by a few select interfaces that support multi-user HSteamUser GetHSteamUser() { - PRINT_DEBUG("GetHSteamUser\n"); + PRINT_DEBUG("Steam_User::GetHSteamUser\n"); return CLIENT_HSTEAMUSER; } @@ -112,7 +112,7 @@ CSteamID GetSteamID() int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure ) { - PRINT_DEBUG("InitiateGameConnection %i %llu %u %u %u %p\n", cbMaxAuthBlob, steamIDGameServer.ConvertToUint64(), unIPServer, usPortServer, bSecure, pAuthBlob); + PRINT_DEBUG("Steam_User::InitiateGameConnection %i %llu %u %u %u %p\n", cbMaxAuthBlob, steamIDGameServer.ConvertToUint64(), unIPServer, usPortServer, bSecure, pAuthBlob); std::lock_guard lock(global_mutex); if (cbMaxAuthBlob < INITIATE_GAME_CONNECTION_TICKET_SIZE) return 0; if (!pAuthBlob) return 0; @@ -131,7 +131,7 @@ int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamID // needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) { - PRINT_DEBUG("TerminateGameConnection\n"); + PRINT_DEBUG("Steam_User::TerminateGameConnection\n"); } // Legacy functions @@ -139,7 +139,7 @@ void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) // used by only a few games to track usage events void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo) { - PRINT_DEBUG("TrackAppUsageEvent\n"); + PRINT_DEBUG("Steam_User::TrackAppUsageEvent\n"); } void RefreshSteam2Login() @@ -151,7 +151,7 @@ void RefreshSteam2Login() // this will usually be something like "C:\Progam Files\Steam\userdata\\\local" bool GetUserDataFolder( char *pchBuffer, int cubBuffer ) { - PRINT_DEBUG("GetUserDataFolder\n"); + PRINT_DEBUG("Steam_User::GetUserDataFolder\n"); if (!cubBuffer) return false; std::string user_data = local_storage->get_path(Local_Storage::user_data_storage); @@ -163,7 +163,7 @@ bool GetUserDataFolder( char *pchBuffer, int cubBuffer ) // Starts voice recording. Once started, use GetVoice() to get the data void StartVoiceRecording( ) { - PRINT_DEBUG("StartVoiceRecording\n"); + PRINT_DEBUG("Steam_User::StartVoiceRecording\n"); last_get_voice = std::chrono::high_resolution_clock::now(); recording = true; //TODO:fix @@ -175,7 +175,7 @@ void StartVoiceRecording( ) // k_eVoiceResultNotRecording void StopVoiceRecording( ) { - PRINT_DEBUG("StopVoiceRecording\n"); + PRINT_DEBUG("Steam_User::StopVoiceRecording\n"); recording = false; } @@ -185,7 +185,7 @@ void StopVoiceRecording( ) // below for further explanation of "uncompressed" data. EVoiceResult GetAvailableVoice( uint32 *pcbCompressed, uint32 *pcbUncompressed_Deprecated, uint32 nUncompressedVoiceDesiredSampleRate_Deprecated ) { - PRINT_DEBUG("GetAvailableVoice\n"); + PRINT_DEBUG("Steam_User::GetAvailableVoice\n"); if (pcbCompressed) *pcbCompressed = 0; if (pcbUncompressed_Deprecated) *pcbUncompressed_Deprecated = 0; if (!recording) return k_EVoiceResultNotRecording; @@ -225,7 +225,7 @@ EVoiceResult GetAvailableVoice(uint32 *pcbCompressed, uint32 *pcbUncompressed) // using the DecompressVoice function below. EVoiceResult GetVoice( bool bWantCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, bool bWantUncompressed_Deprecated, void *pUncompressedDestBuffer_Deprecated , uint32 cbUncompressedDestBufferSize_Deprecated , uint32 *nUncompressBytesWritten_Deprecated , uint32 nUncompressedVoiceDesiredSampleRate_Deprecated ) { - PRINT_DEBUG("GetVoice\n"); + PRINT_DEBUG("Steam_User::GetVoice\n"); if (!recording) return k_EVoiceResultNotRecording; double seconds = std::chrono::duration_cast>(std::chrono::high_resolution_clock::now() - last_get_voice).count(); if (bWantCompressed) { @@ -236,7 +236,7 @@ EVoiceResult GetVoice( bool bWantCompressed, void *pDestBuffer, uint32 cbDestBuf } if (bWantUncompressed_Deprecated) { - PRINT_DEBUG("Wanted Uncompressed\n"); + PRINT_DEBUG("Steam_User::GetVoice Wanted Uncompressed\n"); } last_get_voice = std::chrono::high_resolution_clock::now(); @@ -263,7 +263,7 @@ EVoiceResult GetCompressedVoice( void *pDestBuffer, uint32 cbDestBufferSize, uin // It is suggested to start with a 20kb buffer and reallocate as necessary. EVoiceResult DecompressVoice( const void *pCompressed, uint32 cbCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, uint32 nDesiredSampleRate ) { - PRINT_DEBUG("DecompressVoice\n"); + PRINT_DEBUG("Steam_User::DecompressVoice\n"); if (!recording) return k_EVoiceResultNotRecording; uint32 uncompressed = (double)cbCompressed * ((double)nDesiredSampleRate / 8192.0); if(nBytesWritten) *nBytesWritten = uncompressed; @@ -294,7 +294,7 @@ EVoiceResult DecompressVoice( void *pCompressed, uint32 cbCompressed, void *pDes // which is usually 48000 or 44100. uint32 GetVoiceOptimalSampleRate() { - PRINT_DEBUG("GetVoiceOptimalSampleRate\n"); + PRINT_DEBUG("Steam_User::GetVoiceOptimalSampleRate\n"); return 48000; } @@ -368,7 +368,7 @@ EUserHasLicenseForAppResult UserHasLicenseForApp( CSteamID steamID, AppId_t appI // (i.e a SteamServersConnected_t has been issued) and may not catch all forms of NAT. bool BIsBehindNAT() { - PRINT_DEBUG("BIsBehindNAT\n"); + PRINT_DEBUG("Steam_User::BIsBehindNAT\n"); return false; } @@ -377,7 +377,7 @@ bool BIsBehindNAT() // uint32 unIPServer, uint16 usPortServer - the IP address of the game server void AdvertiseGame( CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer ) { - PRINT_DEBUG("AdvertiseGame\n"); + PRINT_DEBUG("Steam_User::AdvertiseGame\n"); std::lock_guard lock(global_mutex); Gameserver *server = new Gameserver(); server->set_id(steamIDGameServer.ConvertToUint64()); @@ -468,14 +468,14 @@ bool GetEncryptedAppTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) // the user has can have two different badges for a series; the regular (max level 5) and the foil (max level 1) int GetGameBadgeLevel( int nSeries, bool bFoil ) { - PRINT_DEBUG("GetGameBadgeLevel\n"); + PRINT_DEBUG("Steam_User::GetGameBadgeLevel\n"); return 0; } // gets the Steam Level of the user, as shown on their profile int GetPlayerSteamLevel() { - PRINT_DEBUG("GetPlayerSteamLevel\n"); + PRINT_DEBUG("Steam_User::GetPlayerSteamLevel\n"); return 100; } @@ -492,42 +492,42 @@ int GetPlayerSteamLevel() STEAM_CALL_RESULT( StoreAuthURLResponse_t ) SteamAPICall_t RequestStoreAuthURL( const char *pchRedirectURL ) { - PRINT_DEBUG("RequestStoreAuthURL\n"); + PRINT_DEBUG("Steam_User::RequestStoreAuthURL\n"); return 0; } // gets whether the users phone number is verified bool BIsPhoneVerified() { - PRINT_DEBUG("BIsPhoneVerified\n"); + PRINT_DEBUG("Steam_User::BIsPhoneVerified\n"); return true; } // gets whether the user has two factor enabled on their account bool BIsTwoFactorEnabled() { - PRINT_DEBUG("BIsTwoFactorEnabled\n"); + PRINT_DEBUG("Steam_User::BIsTwoFactorEnabled\n"); return true; } // gets whether the users phone number is identifying bool BIsPhoneIdentifying() { - PRINT_DEBUG("BIsPhoneIdentifying\n"); + PRINT_DEBUG("Steam_User::BIsPhoneIdentifying\n"); return false; } // gets whether the users phone number is awaiting (re)verification bool BIsPhoneRequiringVerification() { - PRINT_DEBUG("BIsPhoneRequiringVerification\n"); + PRINT_DEBUG("Steam_User::BIsPhoneRequiringVerification\n"); return false; } STEAM_CALL_RESULT( MarketEligibilityResponse_t ) SteamAPICall_t GetMarketEligibility() { - PRINT_DEBUG("GetMarketEligibility\n"); + PRINT_DEBUG("Steam_User::GetMarketEligibility\n"); return 0; } @@ -535,7 +535,7 @@ SteamAPICall_t GetMarketEligibility() STEAM_CALL_RESULT( DurationControl_t ) SteamAPICall_t GetDurationControl() { - PRINT_DEBUG("GetDurationControl\n"); + PRINT_DEBUG("Steam_User::GetDurationControl\n"); return 0; } @@ -544,7 +544,7 @@ SteamAPICall_t GetDurationControl() // playtime limits. bool BSetDurationControlOnlineState( EDurationControlOnlineState eNewState ) { - PRINT_DEBUG("BSetDurationControlOnlineState\n"); + PRINT_DEBUG("Steam_User::BSetDurationControlOnlineState\n"); return false; } diff --git a/dll/dll/steam_user_stats.h b/dll/dll/steam_user_stats.h index 69eac028..ddd19dba 100644 --- a/dll/dll/steam_user_stats.h +++ b/dll/dll/steam_user_stats.h @@ -176,7 +176,7 @@ std::vector load_leaderboard_scores(std::string name) i += 1; } - PRINT_DEBUG("loaded leaderboard score %llu %u\n", score.steam_id.ConvertToUint64(), score.score); + PRINT_DEBUG("Steam_User_Stats::loaded leaderboard score %llu %u\n", score.steam_id.ConvertToUint64(), score.score); out.push_back(score); } @@ -295,7 +295,7 @@ bool RequestCurrentStats() // Data accessors bool GetStat( const char *pchName, int32 *pData ) { - PRINT_DEBUG("GetStat int32 %s\n", pchName); + PRINT_DEBUG("Steam_User_Stats::GetStat int32 %s\n", pchName); std::lock_guard lock(global_mutex); if (!pchName || !pData) return false; @@ -332,7 +332,7 @@ bool GetStat( const char *pchName, int32 *pData ) bool GetStat( const char *pchName, float *pData ) { - PRINT_DEBUG("GetStat float %s\n", pchName); + PRINT_DEBUG("Steam_User_Stats::GetStat float %s\n", pchName); std::lock_guard lock(global_mutex); if (!pchName || !pData) return false; @@ -371,7 +371,7 @@ bool GetStat( const char *pchName, float *pData ) // Set / update data bool SetStat( const char *pchName, int32 nData ) { - PRINT_DEBUG("SetStat int32 %s\n", pchName); + PRINT_DEBUG("Steam_User_Stats::SetStat int32 %s\n", pchName); std::lock_guard lock(global_mutex); if (!pchName) return false; @@ -401,7 +401,7 @@ bool SetStat( const char *pchName, int32 nData ) bool SetStat( const char *pchName, float fData ) { - PRINT_DEBUG("SetStat float %s\n", pchName); + PRINT_DEBUG("Steam_User_Stats::SetStat float %s\n", pchName); std::lock_guard lock(global_mutex); if (!pchName) return false; @@ -431,7 +431,7 @@ bool SetStat( const char *pchName, float fData ) bool UpdateAvgRateStat( const char *pchName, float flCountThisSession, double dSessionLength ) { - PRINT_DEBUG("UpdateAvgRateStat %s\n", pchName); + PRINT_DEBUG("Steam_User_Stats::UpdateAvgRateStat %s\n", pchName); std::lock_guard lock(global_mutex); if (!pchName) return false; @@ -466,7 +466,7 @@ bool UpdateAvgRateStat( const char *pchName, float flCountThisSession, double dS // Achievement flag accessors bool GetAchievement( const char *pchName, bool *pbAchieved ) { - PRINT_DEBUG("GetAchievement %s\n", pchName); + PRINT_DEBUG("Steam_User_Stats::GetAchievement %s\n", pchName); std::lock_guard lock(global_mutex); if (pchName == nullptr) return false; @@ -490,7 +490,7 @@ bool GetAchievement( const char *pchName, bool *pbAchieved ) bool SetAchievement( const char *pchName ) { - PRINT_DEBUG("SetAchievement %s\n", pchName); + PRINT_DEBUG("Steam_User_Stats::SetAchievement %s\n", pchName); std::lock_guard lock(global_mutex); if (pchName == nullptr) return false; @@ -521,7 +521,7 @@ bool SetAchievement( const char *pchName ) bool ClearAchievement( const char *pchName ) { - PRINT_DEBUG("ClearAchievement %s\n", pchName); + PRINT_DEBUG("Steam_User_Stats::ClearAchievement %s\n", pchName); std::lock_guard lock(global_mutex); if (pchName == nullptr) return false; @@ -548,7 +548,7 @@ bool ClearAchievement( const char *pchName ) // began tracking achievement unlock times (December 2009). Time is seconds since January 1, 1970. bool GetAchievementAndUnlockTime( const char *pchName, bool *pbAchieved, uint32 *punUnlockTime ) { - PRINT_DEBUG("GetAchievementAndUnlockTime\n"); + PRINT_DEBUG("Steam_User_Stats::GetAchievementAndUnlockTime\n"); std::lock_guard lock(global_mutex); if (pchName == nullptr) return false; @@ -581,7 +581,7 @@ bool GetAchievementAndUnlockTime( const char *pchName, bool *pbAchieved, uint32 // The stats should be re-iterated to keep in sync. bool StoreStats() { - PRINT_DEBUG("StoreStats\n"); + PRINT_DEBUG("Steam_User_Stats::StoreStats\n"); std::lock_guard lock(global_mutex); UserStatsStored_t data; @@ -600,7 +600,7 @@ bool StoreStats() // specified achievement. int GetAchievementIcon( const char *pchName ) { - PRINT_DEBUG("GetAchievementIcon\n"); + PRINT_DEBUG("Steam_User_Stats::GetAchievementIcon\n"); std::lock_guard lock(global_mutex); if (pchName == nullptr) return 0; @@ -629,7 +629,7 @@ std::string get_achievement_icon_name( const char *pchName, bool pbAchieved ) // - "hidden" for retrieving if an achievement is hidden (returns "0" when not hidden, "1" when hidden) const char * GetAchievementDisplayAttribute( const char *pchName, const char *pchKey ) { - PRINT_DEBUG("GetAchievementDisplayAttribute %s %s\n", pchName, pchKey); + PRINT_DEBUG("Steam_User_Stats::GetAchievementDisplayAttribute %s %s\n", pchName, pchKey); std::lock_guard lock(global_mutex); if (pchName == nullptr) return ""; @@ -671,7 +671,7 @@ const char * GetAchievementDisplayAttribute( const char *pchName, const char *pc // Calling this w/ N out of N progress will NOT set the achievement, the game must still do that. bool IndicateAchievementProgress( const char *pchName, uint32 nCurProgress, uint32 nMaxProgress ) { - PRINT_DEBUG("IndicateAchievementProgress %s\n", pchName); + PRINT_DEBUG("Steam_User_Stats::IndicateAchievementProgress %s\n", pchName); std::lock_guard lock(global_mutex); if (pchName == nullptr) return false; @@ -718,7 +718,7 @@ bool IndicateAchievementProgress( const char *pchName, uint32 nCurProgress, uint // list of existing achievements compiled into them uint32 GetNumAchievements() { - PRINT_DEBUG("GetNumAchievements\n"); + PRINT_DEBUG("Steam_User_Stats::GetNumAchievements\n"); std::lock_guard lock(global_mutex); return defined_achievements.size(); } @@ -726,7 +726,7 @@ uint32 GetNumAchievements() // Get achievement name iAchievement in [0,GetNumAchievements) const char * GetAchievementName( uint32 iAchievement ) { - PRINT_DEBUG("GetAchievementName\n"); + PRINT_DEBUG("Steam_User_Stats::GetAchievementName\n"); std::lock_guard lock(global_mutex); if (iAchievement >= sorted_achievement_names.size()) { return ""; @@ -765,7 +765,7 @@ SteamAPICall_t RequestUserStats( CSteamID steamIDUser ) // requests stat information for a user, usable after a successful call to RequestUserStats() bool GetUserStat( CSteamID steamIDUser, const char *pchName, int32 *pData ) { - PRINT_DEBUG("GetUserStat %s %llu\n", pchName, steamIDUser.ConvertToUint64()); + PRINT_DEBUG("Steam_User_Stats::GetUserStat %s %llu\n", pchName, steamIDUser.ConvertToUint64()); std::lock_guard lock(global_mutex); if (pchName == nullptr) return false; @@ -781,7 +781,7 @@ bool GetUserStat( CSteamID steamIDUser, const char *pchName, int32 *pData ) bool GetUserStat( CSteamID steamIDUser, const char *pchName, float *pData ) { - PRINT_DEBUG("GetUserStat %s %llu\n", pchName, steamIDUser.ConvertToUint64()); + PRINT_DEBUG("Steam_User_Stats::GetUserStat %s %llu\n", pchName, steamIDUser.ConvertToUint64()); std::lock_guard lock(global_mutex); if (pchName == nullptr) return false; @@ -797,7 +797,7 @@ bool GetUserStat( CSteamID steamIDUser, const char *pchName, float *pData ) bool GetUserAchievement( CSteamID steamIDUser, const char *pchName, bool *pbAchieved ) { - PRINT_DEBUG("GetUserAchievement %s\n", pchName); + PRINT_DEBUG("Steam_User_Stats::GetUserAchievement %s\n", pchName); std::lock_guard lock(global_mutex); if (pchName == nullptr) return false; @@ -812,7 +812,7 @@ bool GetUserAchievement( CSteamID steamIDUser, const char *pchName, bool *pbAchi // See notes for GetAchievementAndUnlockTime above bool GetUserAchievementAndUnlockTime( CSteamID steamIDUser, const char *pchName, bool *pbAchieved, uint32 *punUnlockTime ) { - PRINT_DEBUG("GetUserAchievementAndUnlockTime %s\n", pchName); + PRINT_DEBUG("Steam_User_Stats::GetUserAchievementAndUnlockTime %s\n", pchName); std::lock_guard lock(global_mutex); if (pchName == nullptr) return false; @@ -827,7 +827,7 @@ bool GetUserAchievementAndUnlockTime( CSteamID steamIDUser, const char *pchName, // Reset stats bool ResetAllStats( bool bAchievementsToo ) { - PRINT_DEBUG("ResetAllStats\n"); + PRINT_DEBUG("Steam_User_Stats::ResetAllStats\n"); std::lock_guard lock(global_mutex); //TODO if (bAchievementsToo) { @@ -848,7 +848,7 @@ bool ResetAllStats( bool bAchievementsToo ) STEAM_CALL_RESULT(LeaderboardFindResult_t) SteamAPICall_t FindOrCreateLeaderboard( const char *pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) { - PRINT_DEBUG("FindOrCreateLeaderboard %s\n", pchLeaderboardName); + PRINT_DEBUG("Steam_User_Stats::FindOrCreateLeaderboard %s\n", pchLeaderboardName); std::lock_guard lock(global_mutex); if (!pchLeaderboardName) { LeaderboardFindResult_t data; @@ -888,7 +888,7 @@ SteamAPICall_t FindOrCreateLeaderboard( const char *pchLeaderboardName, ELeaderb STEAM_CALL_RESULT( LeaderboardFindResult_t ) SteamAPICall_t FindLeaderboard( const char *pchLeaderboardName ) { - PRINT_DEBUG("FindLeaderboard %s\n", pchLeaderboardName); + PRINT_DEBUG("Steam_User_Stats::FindLeaderboard %s\n", pchLeaderboardName); std::lock_guard lock(global_mutex); if (!pchLeaderboardName) { LeaderboardFindResult_t data; @@ -915,7 +915,7 @@ SteamAPICall_t FindLeaderboard( const char *pchLeaderboardName ) // returns the name of a leaderboard const char * GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard ) { - PRINT_DEBUG("GetLeaderboardName\n"); + PRINT_DEBUG("Steam_User_Stats::GetLeaderboardName\n"); std::lock_guard lock(global_mutex); if (hSteamLeaderboard > leaderboards.size() || hSteamLeaderboard <= 0) return ""; @@ -926,7 +926,7 @@ const char * GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard ) // returns the total number of entries in a leaderboard, as of the last request int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard ) { - PRINT_DEBUG("GetLeaderboardEntryCount\n"); + PRINT_DEBUG("Steam_User_Stats::GetLeaderboardEntryCount\n"); return 0; } @@ -934,7 +934,7 @@ int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard ) // returns the sort method of the leaderboard ELeaderboardSortMethod GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLeaderboard ) { - PRINT_DEBUG("GetLeaderboardSortMethod\n"); + PRINT_DEBUG("Steam_User_Stats::GetLeaderboardSortMethod\n"); std::lock_guard lock(global_mutex); if (hSteamLeaderboard > leaderboards.size() || hSteamLeaderboard <= 0) return k_ELeaderboardSortMethodNone; return leaderboards[hSteamLeaderboard - 1].sort_method; @@ -944,7 +944,7 @@ ELeaderboardSortMethod GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLeader // returns the display type of the leaderboard ELeaderboardDisplayType GetLeaderboardDisplayType( SteamLeaderboard_t hSteamLeaderboard ) { - PRINT_DEBUG("GetLeaderboardDisplayType\n"); + PRINT_DEBUG("Steam_User_Stats::GetLeaderboardDisplayType\n"); std::lock_guard lock(global_mutex); if (hSteamLeaderboard > leaderboards.size() || hSteamLeaderboard <= 0) return k_ELeaderboardDisplayTypeNone; return leaderboards[hSteamLeaderboard - 1].display_type; @@ -962,7 +962,7 @@ ELeaderboardDisplayType GetLeaderboardDisplayType( SteamLeaderboard_t hSteamLead STEAM_CALL_RESULT( LeaderboardScoresDownloaded_t ) SteamAPICall_t DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) { - PRINT_DEBUG("DownloadLeaderboardEntries %llu %i %i %i\n", hSteamLeaderboard, eLeaderboardDataRequest, nRangeStart, nRangeEnd); + PRINT_DEBUG("Steam_User_Stats::DownloadLeaderboardEntries %llu %i %i %i\n", hSteamLeaderboard, eLeaderboardDataRequest, nRangeStart, nRangeEnd); std::lock_guard lock(global_mutex); if (hSteamLeaderboard > leaderboards.size() || hSteamLeaderboard <= 0) return k_uAPICallInvalid; //might return callresult even if hSteamLeaderboard is invalid @@ -981,7 +981,7 @@ STEAM_CALL_RESULT( LeaderboardScoresDownloaded_t ) SteamAPICall_t DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLeaderboard, STEAM_ARRAY_COUNT_D(cUsers, Array of users to retrieve) CSteamID *prgUsers, int cUsers ) { - PRINT_DEBUG("DownloadLeaderboardEntriesForUsers %i %llu\n", cUsers, cUsers > 0 ? prgUsers[0].ConvertToUint64() : 0); + PRINT_DEBUG("Steam_User_Stats::DownloadLeaderboardEntriesForUsers %i %llu\n", cUsers, cUsers > 0 ? prgUsers[0].ConvertToUint64() : 0); std::lock_guard lock(global_mutex); if (hSteamLeaderboard > leaderboards.size() || hSteamLeaderboard <= 0) return k_uAPICallInvalid; //might return callresult even if hSteamLeaderboard is invalid @@ -1016,7 +1016,7 @@ SteamAPICall_t DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLead // once you've accessed all the entries, the data will be free'd, and the SteamLeaderboardEntries_t handle will become invalid bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry_t *pLeaderboardEntry, int32 *pDetails, int cDetailsMax ) { - PRINT_DEBUG("GetDownloadedLeaderboardEntry\n"); + PRINT_DEBUG("Steam_User_Stats::GetDownloadedLeaderboardEntry\n"); std::lock_guard lock(global_mutex); if (hSteamLeaderboardEntries > leaderboards.size() || hSteamLeaderboardEntries <= 0) return false; if (index > 0) return false; @@ -1041,7 +1041,7 @@ bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLeaderboardE STEAM_CALL_RESULT( LeaderboardScoreUploaded_t ) SteamAPICall_t UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, const int32 *pScoreDetails, int cScoreDetailsCount ) { - PRINT_DEBUG("UploadLeaderboardScore %i\n", nScore); + PRINT_DEBUG("Steam_User_Stats::UploadLeaderboardScore %i\n", nScore); std::lock_guard lock(global_mutex); if (hSteamLeaderboard > leaderboards.size() || hSteamLeaderboard <= 0) return k_uAPICallInvalid; //TODO: might return callresult even if hSteamLeaderboard is invalid @@ -1093,7 +1093,7 @@ SteamAPICall_t UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, int STEAM_CALL_RESULT( LeaderboardUGCSet_t ) SteamAPICall_t AttachLeaderboardUGC( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ) { - PRINT_DEBUG("AttachLeaderboardUGC\n"); + PRINT_DEBUG("Steam_User_Stats::AttachLeaderboardUGC\n"); std::lock_guard lock(global_mutex); LeaderboardUGCSet_t data = {}; if (hSteamLeaderboard > leaderboards.size() || hSteamLeaderboard <= 0) { @@ -1112,7 +1112,7 @@ SteamAPICall_t AttachLeaderboardUGC( SteamLeaderboard_t hSteamLeaderboard, UGCHa STEAM_CALL_RESULT( NumberOfCurrentPlayers_t ) SteamAPICall_t GetNumberOfCurrentPlayers() { - PRINT_DEBUG("GetNumberOfCurrentPlayers\n"); + PRINT_DEBUG("Steam_User_Stats::GetNumberOfCurrentPlayers\n"); std::lock_guard lock(global_mutex); NumberOfCurrentPlayers_t data; data.m_bSuccess = 1; @@ -1127,7 +1127,7 @@ SteamAPICall_t GetNumberOfCurrentPlayers() STEAM_CALL_RESULT( GlobalAchievementPercentagesReady_t ) SteamAPICall_t RequestGlobalAchievementPercentages() { - PRINT_DEBUG("RequestGlobalAchievementPercentages\n"); + PRINT_DEBUG("Steam_User_Stats::RequestGlobalAchievementPercentages\n"); return 0; } @@ -1137,7 +1137,7 @@ SteamAPICall_t RequestGlobalAchievementPercentages() // percentages (ie, you haven't called RequestGlobalAchievementPercentages and waited on the callback). int GetMostAchievedAchievementInfo( char *pchName, uint32 unNameBufLen, float *pflPercent, bool *pbAchieved ) { - PRINT_DEBUG("GetMostAchievedAchievementInfo\n"); + PRINT_DEBUG("Steam_User_Stats::GetMostAchievedAchievementInfo\n"); return -1; } @@ -1147,7 +1147,7 @@ int GetMostAchievedAchievementInfo( char *pchName, uint32 unNameBufLen, float *p // achievement has been iterated. int GetNextMostAchievedAchievementInfo( int iIteratorPrevious, char *pchName, uint32 unNameBufLen, float *pflPercent, bool *pbAchieved ) { - PRINT_DEBUG("GetNextMostAchievedAchievementInfo\n"); + PRINT_DEBUG("Steam_User_Stats::GetNextMostAchievedAchievementInfo\n"); return -1; } @@ -1155,7 +1155,7 @@ int GetNextMostAchievedAchievementInfo( int iIteratorPrevious, char *pchName, ui // Returns the percentage of users who have achieved the specified achievement. bool GetAchievementAchievedPercent( const char *pchName, float *pflPercent ) { - PRINT_DEBUG("GetAchievementAchievedPercent\n"); + PRINT_DEBUG("Steam_User_Stats::GetAchievementAchievedPercent\n"); return false; } @@ -1167,7 +1167,7 @@ bool GetAchievementAchievedPercent( const char *pchName, float *pflPercent ) STEAM_CALL_RESULT( GlobalStatsReceived_t ) SteamAPICall_t RequestGlobalStats( int nHistoryDays ) { - PRINT_DEBUG("RequestGlobalStats %i\n", nHistoryDays); + PRINT_DEBUG("Steam_User_Stats::RequestGlobalStats %i\n", nHistoryDays); std::lock_guard lock(global_mutex); GlobalStatsReceived_t data; data.m_nGameID = settings->get_local_game_id().ToUint64(); @@ -1179,13 +1179,13 @@ SteamAPICall_t RequestGlobalStats( int nHistoryDays ) // Gets the lifetime totals for an aggregated stat bool GetGlobalStat( const char *pchStatName, int64 *pData ) { - PRINT_DEBUG("GetGlobalStat %s\n", pchStatName); + PRINT_DEBUG("Steam_User_Stats::GetGlobalStat %s\n", pchStatName); return false; } bool GetGlobalStat( const char *pchStatName, double *pData ) { - PRINT_DEBUG("GetGlobalStat %s\n", pchStatName); + PRINT_DEBUG("Steam_User_Stats::GetGlobalStat %s\n", pchStatName); return false; } @@ -1196,13 +1196,13 @@ bool GetGlobalStat( const char *pchStatName, double *pData ) // elements actually set. int32 GetGlobalStatHistory( const char *pchStatName, STEAM_ARRAY_COUNT(cubData) int64 *pData, uint32 cubData ) { - PRINT_DEBUG("GetGlobalStatHistory int64 %s\n", pchStatName); + PRINT_DEBUG("Steam_User_Stats::GetGlobalStatHistory int64 %s\n", pchStatName); return 0; } int32 GetGlobalStatHistory( const char *pchStatName, STEAM_ARRAY_COUNT(cubData) double *pData, uint32 cubData ) { - PRINT_DEBUG("GetGlobalStatHistory double %s\n", pchStatName); + PRINT_DEBUG("Steam_User_Stats::GetGlobalStatHistory double %s\n", pchStatName); return 0; } @@ -1211,13 +1211,13 @@ int32 GetGlobalStatHistory( const char *pchStatName, STEAM_ARRAY_COUNT(cubData) // have been made, to show a progress notification to the user. bool GetAchievementProgressLimits( const char *pchName, int32 *pnMinProgress, int32 *pnMaxProgress ) { - PRINT_DEBUG("GetAchievementProgressLimits int\n"); + PRINT_DEBUG("Steam_User_Stats::GetAchievementProgressLimits int\n"); return false; } bool GetAchievementProgressLimits( const char *pchName, float *pfMinProgress, float *pfMaxProgress ) { - PRINT_DEBUG("GetAchievementProgressLimits float\n"); + PRINT_DEBUG("Steam_User_Stats::GetAchievementProgressLimits float\n"); return false; } diff --git a/dll/dll/steam_utils.h b/dll/dll/steam_utils.h index 2582615c..2ca30114 100644 --- a/dll/dll/steam_utils.h +++ b/dll/dll/steam_utils.h @@ -19,8 +19,6 @@ #include "local_storage.h" #include "overlay/steam_overlay.h" -static std::chrono::time_point app_initialized_time = std::chrono::steady_clock::now(); - class Steam_Utils : public ISteamUtils002, @@ -48,13 +46,15 @@ Steam_Utils(Settings *settings, class SteamCallResults *callback_results, Steam_ // return the number of seconds since the user uint32 GetSecondsSinceAppActive() { - PRINT_DEBUG("GetSecondsSinceAppActive\n"); - return std::chrono::duration_cast(std::chrono::steady_clock::now() - app_initialized_time).count(); + PRINT_DEBUG("Steam_Utils::GetSecondsSinceAppActive\n"); + std::lock_guard lock(global_mutex); + return std::chrono::duration_cast(std::chrono::system_clock::now() - startup_time).count(); } uint32 GetSecondsSinceComputerActive() { - PRINT_DEBUG("GetSecondsSinceComputerActive\n"); + PRINT_DEBUG("Steam_Utils::GetSecondsSinceComputerActive\n"); + std::lock_guard lock(global_mutex); return GetSecondsSinceAppActive() + 2000; } @@ -62,7 +62,8 @@ uint32 GetSecondsSinceComputerActive() // the universe this client is connecting to EUniverse GetConnectedUniverse() { - PRINT_DEBUG("GetConnectedUniverse\n"); + PRINT_DEBUG("Steam_Utils::GetConnectedUniverse\n"); + std::lock_guard lock(global_mutex); return k_EUniversePublic; } @@ -70,9 +71,9 @@ EUniverse GetConnectedUniverse() // Steam server time. Number of seconds since January 1, 1970, GMT (i.e unix time) uint32 GetServerRealTime() { - PRINT_DEBUG("GetServerRealTime\n"); + PRINT_DEBUG("Steam_Utils::GetServerRealTime\n"); uint32 server_time = std::chrono::duration_cast>(std::chrono::system_clock::now().time_since_epoch()).count(); - PRINT_DEBUG("Time %u\n", server_time); + PRINT_DEBUG("Steam_Utils::GetServerRealTime Time %u\n", server_time); return server_time; } @@ -81,14 +82,15 @@ uint32 GetServerRealTime() // e.g "US" or "UK". const char *GetIPCountry() { - PRINT_DEBUG("GetIPCountry\n"); + PRINT_DEBUG("Steam_Utils::GetIPCountry\n"); + std::lock_guard lock(global_mutex); return "US"; } // returns true if the image exists, and valid sizes were filled out bool GetImageSize( int iImage, uint32 *pnWidth, uint32 *pnHeight ) { - PRINT_DEBUG("GetImageSize %i\n", iImage); + PRINT_DEBUG("Steam_Utils::GetImageSize %i\n", iImage); std::lock_guard lock(global_mutex); if (!iImage || !pnWidth || !pnHeight) return false; @@ -106,7 +108,7 @@ bool GetImageSize( int iImage, uint32 *pnWidth, uint32 *pnHeight ) // the destination buffer size should be 4 * height * width * sizeof(char) bool GetImageRGBA( int iImage, uint8 *pubDest, int nDestBufferSize ) { - PRINT_DEBUG("GetImageRGBA %i\n", iImage); + PRINT_DEBUG("Steam_Utils::GetImageRGBA %i\n", iImage); std::lock_guard lock(global_mutex); if (!iImage || !pubDest || !nDestBufferSize) return false; @@ -123,7 +125,8 @@ bool GetImageRGBA( int iImage, uint8 *pubDest, int nDestBufferSize ) // returns the IP of the reporting server for valve - currently only used in Source engine games bool GetCSERIPPort( uint32 *unIP, uint16 *usPort ) { - PRINT_DEBUG("GetCSERIPPort\n"); + PRINT_DEBUG("Steam_Utils::GetCSERIPPort\n"); + std::lock_guard lock(global_mutex); return false; } @@ -131,7 +134,8 @@ bool GetCSERIPPort( uint32 *unIP, uint16 *usPort ) // return the amount of battery power left in the current system in % [0..100], 255 for being on AC power uint8 GetCurrentBatteryPower() { - PRINT_DEBUG("GetCurrentBatteryPower\n"); + PRINT_DEBUG("Steam_Utils::GetCurrentBatteryPower\n"); + std::lock_guard lock(global_mutex); return 255; } @@ -139,7 +143,7 @@ uint8 GetCurrentBatteryPower() // returns the appID of the current process uint32 GetAppID() { - PRINT_DEBUG("GetAppID\n"); + PRINT_DEBUG("Steam_Utils::GetAppID\n"); std::lock_guard lock(global_mutex); return settings->get_local_game_id().AppID(); } @@ -149,7 +153,7 @@ uint32 GetAppID() // This position is per-game and if this function is called from outside of a game context it will do nothing. void SetOverlayNotificationPosition( ENotificationPosition eNotificationPosition ) { - PRINT_DEBUG("SetOverlayNotificationPosition\n"); + PRINT_DEBUG("Steam_Utils::SetOverlayNotificationPosition\n"); std::lock_guard lock(global_mutex); overlay->SetNotificationPosition(eNotificationPosition); } @@ -159,7 +163,7 @@ void SetOverlayNotificationPosition( ENotificationPosition eNotificationPosition // can be used directly, but more commonly used via the callback dispatch API (see steam_api.h) bool IsAPICallCompleted( SteamAPICall_t hSteamAPICall, bool *pbFailed ) { - PRINT_DEBUG("IsAPICallCompleted: %llu\n", hSteamAPICall); + PRINT_DEBUG("Steam_Utils::IsAPICallCompleted: %llu\n", hSteamAPICall); std::lock_guard lock(global_mutex); if (hSteamAPICall == 1) { //bug ? soul calibur 6 calls this function with the return value 1 of Steam_User_Stats::RequestCurrentStats and expects this function to return true if (pbFailed) *pbFailed = true; @@ -173,17 +177,18 @@ bool IsAPICallCompleted( SteamAPICall_t hSteamAPICall, bool *pbFailed ) ESteamAPICallFailure GetAPICallFailureReason( SteamAPICall_t hSteamAPICall ) { - PRINT_DEBUG("GetAPICallFailureReason\n"); + PRINT_DEBUG("Steam_Utils::GetAPICallFailureReason\n"); + std::lock_guard lock(global_mutex); return k_ESteamAPICallFailureNone; } bool GetAPICallResult( SteamAPICall_t hSteamAPICall, void *pCallback, int cubCallback, int iCallbackExpected, bool *pbFailed ) { - PRINT_DEBUG("GetAPICallResult %llu %i %i %p\n", hSteamAPICall, cubCallback, iCallbackExpected, pbFailed); + PRINT_DEBUG("Steam_Utils::GetAPICallResult %llu %i %i %p\n", hSteamAPICall, cubCallback, iCallbackExpected, pbFailed); std::lock_guard lock(global_mutex); if (callback_results->callback_result(hSteamAPICall, pCallback, cubCallback)) { if (pbFailed) *pbFailed = false; - PRINT_DEBUG("GetAPICallResult Succeeded\n"); + PRINT_DEBUG("Steam_Utils::GetAPICallResult Succeeded\n"); return true; } else { return false; @@ -204,7 +209,8 @@ STEAM_PRIVATE_API( void RunFrame() // control how often you do them. uint32 GetIPCCallCount() { - PRINT_DEBUG("GetIPCCallCount\n"); + PRINT_DEBUG("Steam_Utils::GetIPCCallCount\n"); + std::lock_guard lock(global_mutex); static int i = 0; i += 123; return i; //TODO @@ -225,7 +231,7 @@ void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) // start & hook the game process, so this function will initially return false while the overlay is loading. bool IsOverlayEnabled() { - PRINT_DEBUG("IsOverlayEnabled\n"); + PRINT_DEBUG("Steam_Utils::IsOverlayEnabled\n"); std::lock_guard lock(global_mutex); return overlay->Ready(); } @@ -242,7 +248,7 @@ bool IsOverlayEnabled() // refresh the screen with Present or SwapBuffers to allow the overlay to do it's work. bool BOverlayNeedsPresent() { - PRINT_DEBUG("BOverlayNeedsPresent\n"); + PRINT_DEBUG("Steam_Utils::BOverlayNeedsPresent\n"); std::lock_guard lock(global_mutex); return overlay->NeedPresent(); } @@ -259,7 +265,7 @@ bool BOverlayNeedsPresent() STEAM_CALL_RESULT( CheckFileSignature_t ) SteamAPICall_t CheckFileSignature( const char *szFileName ) { - PRINT_DEBUG("CheckFileSignature\n"); + PRINT_DEBUG("Steam_Utils::CheckFileSignature\n"); std::lock_guard lock(global_mutex); CheckFileSignature_t data; data.m_eCheckFileSignature = k_ECheckFileSignatureValidSignature; @@ -270,7 +276,8 @@ SteamAPICall_t CheckFileSignature( const char *szFileName ) // Activates the Big Picture text input dialog which only supports gamepad input bool ShowGamepadTextInput( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32 unCharMax, const char *pchExistingText ) { - PRINT_DEBUG("ShowGamepadTextInput\n"); + PRINT_DEBUG("Steam_Utils::ShowGamepadTextInput\n"); + std::lock_guard lock(global_mutex); return false; } @@ -284,13 +291,15 @@ bool ShowGamepadTextInput( EGamepadTextInputMode eInputMode, EGamepadTextInputLi // Returns previously entered text & length uint32 GetEnteredGamepadTextLength() { - PRINT_DEBUG("GetEnteredGamepadTextLength\n"); + PRINT_DEBUG("Steam_Utils::GetEnteredGamepadTextLength\n"); + std::lock_guard lock(global_mutex); return 0; } bool GetEnteredGamepadTextInput( char *pchText, uint32 cchText ) { - PRINT_DEBUG("GetEnteredGamepadTextInput\n"); + PRINT_DEBUG("Steam_Utils::GetEnteredGamepadTextInput\n"); + std::lock_guard lock(global_mutex); return false; } @@ -298,7 +307,7 @@ bool GetEnteredGamepadTextInput( char *pchText, uint32 cchText ) // returns the language the steam client is running in, you probably want ISteamApps::GetCurrentGameLanguage instead, this is for very special usage cases const char *GetSteamUILanguage() { - PRINT_DEBUG("GetSteamUILanguage\n"); + PRINT_DEBUG("Steam_Utils::GetSteamUILanguage\n"); std::lock_guard lock(global_mutex); return settings->get_language(); } @@ -307,7 +316,7 @@ const char *GetSteamUILanguage() // returns true if Steam itself is running in VR mode bool IsSteamRunningInVR() { - PRINT_DEBUG("IsSteamRunningInVR\n"); + PRINT_DEBUG("Steam_Utils::IsSteamRunningInVR\n"); std::lock_guard lock(global_mutex); return false; } @@ -316,7 +325,7 @@ bool IsSteamRunningInVR() // Sets the inset of the overlay notification from the corner specified by SetOverlayNotificationPosition. void SetOverlayNotificationInset( int nHorizontalInset, int nVerticalInset ) { - PRINT_DEBUG("SetOverlayNotificationInset\n"); + PRINT_DEBUG("Steam_Utils::SetOverlayNotificationInset\n"); std::lock_guard lock(global_mutex); overlay->SetNotificationInset(nHorizontalInset, nVerticalInset); } @@ -327,7 +336,7 @@ void SetOverlayNotificationInset( int nHorizontalInset, int nVerticalInset ) // a game can be added as a non-steam game to the developers library to test this feature bool IsSteamInBigPictureMode() { - PRINT_DEBUG("IsSteamInBigPictureMode\n"); + PRINT_DEBUG("Steam_Utils::IsSteamInBigPictureMode\n"); std::lock_guard lock(global_mutex); return false; } @@ -336,14 +345,15 @@ bool IsSteamInBigPictureMode() // ask SteamUI to create and render its OpenVR dashboard void StartVRDashboard() { - PRINT_DEBUG("StartVRDashboard\n"); + PRINT_DEBUG("Steam_Utils::StartVRDashboard\n"); + std::lock_guard lock(global_mutex); } // Returns true if the HMD content will be streamed via Steam In-Home Streaming bool IsVRHeadsetStreamingEnabled() { - PRINT_DEBUG("IsVRHeadsetStreamingEnabled\n"); + PRINT_DEBUG("Steam_Utils::IsVRHeadsetStreamingEnabled\n"); std::lock_guard lock(global_mutex); return false; } @@ -356,13 +366,14 @@ bool IsVRHeadsetStreamingEnabled() // (this is useful for games that have asymmetric multiplayer gameplay) void SetVRHeadsetStreamingEnabled( bool bEnabled ) { - PRINT_DEBUG("SetVRHeadsetStreamingEnabled\n"); + PRINT_DEBUG("Steam_Utils::SetVRHeadsetStreamingEnabled\n"); + std::lock_guard lock(global_mutex); } // Returns whether this steam client is a Steam China specific client, vs the global client. bool IsSteamChinaLauncher() { - PRINT_DEBUG("IsSteamChinaLauncher\n"); + PRINT_DEBUG("Steam_Utils::IsSteamChinaLauncher\n"); std::lock_guard lock(global_mutex); return false; } @@ -371,7 +382,7 @@ bool IsSteamChinaLauncher() // Returns false if filtering is unavailable for the language the user is currently running in. bool InitFilterText() { - PRINT_DEBUG("InitFilterText old\n"); + PRINT_DEBUG("Steam_Utils::InitFilterText old\n"); std::lock_guard lock(global_mutex); return false; } @@ -381,7 +392,7 @@ bool InitFilterText() // Returns false if filtering is unavailable for the language the user is currently running in. bool InitFilterText( uint32 unFilterOptions ) { - PRINT_DEBUG("InitFilterText\n"); + PRINT_DEBUG("Steam_Utils::InitFilterText\n"); std::lock_guard lock(global_mutex); return false; } @@ -394,7 +405,7 @@ bool InitFilterText( uint32 unFilterOptions ) // Returns the number of characters (not bytes) filtered. int FilterText( char* pchOutFilteredText, uint32 nByteSizeOutFilteredText, const char * pchInputMessage, bool bLegalOnly ) { - PRINT_DEBUG("FilterText old\n"); + PRINT_DEBUG("Steam_Utils::FilterText old\n"); std::lock_guard lock(global_mutex); return FilterText(k_ETextFilteringContextUnknown, CSteamID(), pchInputMessage, pchOutFilteredText, nByteSizeOutFilteredText ); } @@ -408,7 +419,7 @@ int FilterText( char* pchOutFilteredText, uint32 nByteSizeOutFilteredText, const // Returns the number of characters (not bytes) filtered int FilterText( ETextFilteringContext eContext, CSteamID sourceSteamID, const char *pchInputMessage, char *pchOutFilteredText, uint32 nByteSizeOutFilteredText ) { - PRINT_DEBUG("FilterText\n"); + PRINT_DEBUG("Steam_Utils::FilterText\n"); std::lock_guard lock(global_mutex); if (!nByteSizeOutFilteredText) return 0; unsigned len = strlen(pchInputMessage); @@ -427,7 +438,7 @@ int FilterText( ETextFilteringContext eContext, CSteamID sourceSteamID, const ch // This does NOT tell you if the Steam client is currently connected to Steam via ipv6. ESteamIPv6ConnectivityState GetIPv6ConnectivityState( ESteamIPv6ConnectivityProtocol eProtocol ) { - PRINT_DEBUG("GetIPv6ConnectivityState\n"); + PRINT_DEBUG("Steam_Utils::GetIPv6ConnectivityState\n"); std::lock_guard lock(global_mutex); return k_ESteamIPv6ConnectivityState_Unknown; } @@ -435,7 +446,8 @@ ESteamIPv6ConnectivityState GetIPv6ConnectivityState( ESteamIPv6ConnectivityProt // returns true if currently running on the Steam Deck device bool IsSteamRunningOnSteamDeck() { - PRINT_DEBUG("%s %i\n", __FUNCTION__, (int)settings->steam_deck); + PRINT_DEBUG("Steam_Utils::%s %i\n", __FUNCTION__, (int)settings->steam_deck); + std::lock_guard lock(global_mutex); return settings->steam_deck; } @@ -443,19 +455,22 @@ bool IsSteamRunningOnSteamDeck() // The text field position is specified in pixels relative the origin of the game window and is used to position the floating keyboard in a way that doesn't cover the text field bool ShowFloatingGamepadTextInput( EFloatingGamepadTextInputMode eKeyboardMode, int nTextFieldXPosition, int nTextFieldYPosition, int nTextFieldWidth, int nTextFieldHeight ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("Steam_Utils::%s\n", __FUNCTION__); + std::lock_guard lock(global_mutex); return false; } // In game launchers that don't have controller support you can call this to have Steam Input translate the controller input into mouse/kb to navigate the launcher void SetGameLauncherMode( bool bLauncherMode ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("Steam_Utils::%s\n", __FUNCTION__); + std::lock_guard lock(global_mutex); } bool DismissFloatingGamepadTextInput() { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("Steam_Utils::%s\n", __FUNCTION__); + std::lock_guard lock(global_mutex); return true; } diff --git a/dll/steam_apps.cpp b/dll/steam_apps.cpp index b881ddf6..cdfbb117 100644 --- a/dll/steam_apps.cpp +++ b/dll/steam_apps.cpp @@ -30,43 +30,43 @@ Steam_Apps::Steam_Apps(Settings *settings, class SteamCallResults *callback_resu int Steam_Apps::GetAppData( AppId_t nAppID, const char *pchKey, char *pchValue, int cchValueMax ) { //TODO - PRINT_DEBUG("GetAppData %u %s\n", nAppID, pchKey); + PRINT_DEBUG("Steam_Apps::GetAppData %u %s\n", nAppID, pchKey); return 0; } bool Steam_Apps::BIsSubscribed() { - PRINT_DEBUG("BIsSubscribed\n"); + PRINT_DEBUG("Steam_Apps::BIsSubscribed\n"); return true; } bool Steam_Apps::BIsLowViolence() { - PRINT_DEBUG("BIsLowViolence\n"); + PRINT_DEBUG("Steam_Apps::BIsLowViolence\n"); return false; } bool Steam_Apps::BIsCybercafe() { - PRINT_DEBUG("BIsCybercafe\n"); + PRINT_DEBUG("Steam_Apps::BIsCybercafe\n"); return false; } bool Steam_Apps::BIsVACBanned() { - PRINT_DEBUG("BIsVACBanned\n"); + PRINT_DEBUG("Steam_Apps::BIsVACBanned\n"); return false; } const char *Steam_Apps::GetCurrentGameLanguage() { - PRINT_DEBUG("GetCurrentGameLanguage\n"); + PRINT_DEBUG("Steam_Apps::GetCurrentGameLanguage\n"); return settings->get_language(); } const char *Steam_Apps::GetAvailableGameLanguages() { - PRINT_DEBUG("GetAvailableGameLanguages\n"); + PRINT_DEBUG("Steam_Apps::GetAvailableGameLanguages\n"); //TODO? return settings->get_language(); } @@ -75,7 +75,7 @@ const char *Steam_Apps::GetAvailableGameLanguages() // only use this member if you need to check ownership of another game related to yours, a demo for example bool Steam_Apps::BIsSubscribedApp( AppId_t appID ) { - PRINT_DEBUG("BIsSubscribedApp %u\n", appID); + PRINT_DEBUG("Steam_Apps::BIsSubscribedApp %u\n", appID); std::lock_guard lock(global_mutex); if (appID == 0) return true; //I think appid 0 is always owned if (appID == UINT32_MAX) return false; // check Steam_Apps::BIsAppInstalled() @@ -87,7 +87,7 @@ bool Steam_Apps::BIsSubscribedApp( AppId_t appID ) // Takes AppID of DLC and checks if the user owns the DLC & if the DLC is installed bool Steam_Apps::BIsDlcInstalled( AppId_t appID ) { - PRINT_DEBUG("BIsDlcInstalled %u\n", appID); + PRINT_DEBUG("Steam_Apps::BIsDlcInstalled %u\n", appID); std::lock_guard lock(global_mutex); if (appID == 0) return true; if (appID == UINT32_MAX) return false; // check Steam_Apps::BIsAppInstalled() @@ -99,7 +99,7 @@ bool Steam_Apps::BIsDlcInstalled( AppId_t appID ) // returns the Unix time of the purchase of the app uint32 Steam_Apps::GetEarliestPurchaseUnixTime( AppId_t nAppID ) { - PRINT_DEBUG("GetEarliestPurchaseUnixTime\n"); + PRINT_DEBUG("Steam_Apps::GetEarliestPurchaseUnixTime\n"); std::lock_guard lock(global_mutex); if (nAppID == 0) return 0; //TODO is this correct? if (nAppID == UINT32_MAX) return 0; // check Steam_Apps::BIsAppInstalled() TODO is this correct? @@ -122,7 +122,7 @@ uint32 Steam_Apps::GetEarliestPurchaseUnixTime( AppId_t nAppID ) // Before using, please ask your Valve technical contact how to package and secure your free weekened bool Steam_Apps::BIsSubscribedFromFreeWeekend() { - PRINT_DEBUG("BIsSubscribedFromFreeWeekend\n"); + PRINT_DEBUG("Steam_Apps::BIsSubscribedFromFreeWeekend\n"); return false; } @@ -130,7 +130,7 @@ bool Steam_Apps::BIsSubscribedFromFreeWeekend() // Returns the number of DLC pieces for the running app int Steam_Apps::GetDLCCount() { - PRINT_DEBUG("GetDLCCount\n"); + PRINT_DEBUG("Steam_Apps::GetDLCCount\n"); std::lock_guard lock(global_mutex); return settings->DLCCount(); } @@ -139,7 +139,7 @@ int Steam_Apps::GetDLCCount() // Returns metadata for DLC by index, of range [0, GetDLCCount()] bool Steam_Apps::BGetDLCDataByIndex( int iDLC, AppId_t *pAppID, bool *pbAvailable, char *pchName, int cchNameBufferSize ) { - PRINT_DEBUG("BGetDLCDataByIndex\n"); + PRINT_DEBUG("Steam_Apps::BGetDLCDataByIndex\n"); std::lock_guard lock(global_mutex); AppId_t appid; bool available; @@ -165,14 +165,14 @@ bool Steam_Apps::BGetDLCDataByIndex( int iDLC, AppId_t *pAppID, bool *pbAvailabl // Install/Uninstall control for optional DLC void Steam_Apps::InstallDLC( AppId_t nAppID ) { - PRINT_DEBUG("InstallDLC\n"); + PRINT_DEBUG("Steam_Apps::InstallDLC\n"); // we lock here because the API is supposed to modify the DLC list std::lock_guard lock(global_mutex); } void Steam_Apps::UninstallDLC( AppId_t nAppID ) { - PRINT_DEBUG("UninstallDLC\n"); + PRINT_DEBUG("Steam_Apps::UninstallDLC\n"); // we lock here because the API is supposed to modify the DLC list std::lock_guard lock(global_mutex); } @@ -207,7 +207,7 @@ static void FillProofOfPurchaseKey( AppProofOfPurchaseKeyResponse_t& data, AppId // the key is available (which may be immediately). void Steam_Apps::RequestAppProofOfPurchaseKey( AppId_t nAppID ) { - PRINT_DEBUG("TODO RequestAppProofOfPurchaseKey\n"); + PRINT_DEBUG("Steam_Apps::TODO RequestAppProofOfPurchaseKey\n"); std::lock_guard lock(global_mutex); AppProofOfPurchaseKeyResponse_t data{}; @@ -231,7 +231,7 @@ void Steam_Apps::RequestAppProofOfPurchaseKey( AppId_t nAppID ) // https://partner.steamgames.com/doc/api/ISteamApps bool Steam_Apps::GetCurrentBetaName( char *pchName, int cchNameBufferSize ) { - PRINT_DEBUG("GetCurrentBetaName %i\n", cchNameBufferSize); + PRINT_DEBUG("Steam_Apps::GetCurrentBetaName %i\n", cchNameBufferSize); std::lock_guard lock(global_mutex); if (pchName && cchNameBufferSize > settings->current_branch_name.size()) { memcpy(pchName, settings->current_branch_name.c_str(), settings->current_branch_name.size()); @@ -243,7 +243,7 @@ bool Steam_Apps::GetCurrentBetaName( char *pchName, int cchNameBufferSize ) // signal Steam that game files seems corrupt or missing bool Steam_Apps::MarkContentCorrupt( bool bMissingFilesOnly ) { - PRINT_DEBUG("MarkContentCorrupt\n"); + PRINT_DEBUG("Steam_Apps::MarkContentCorrupt\n"); std::lock_guard lock(global_mutex); //TODO: warn user return true; @@ -252,7 +252,7 @@ bool Steam_Apps::MarkContentCorrupt( bool bMissingFilesOnly ) // return installed depots in mount order uint32 Steam_Apps::GetInstalledDepots( AppId_t appID, DepotId_t *pvecDepots, uint32 cMaxDepots ) { - PRINT_DEBUG("GetInstalledDepots %u, %u\n", appID, cMaxDepots); + PRINT_DEBUG("Steam_Apps::GetInstalledDepots %u, %u\n", appID, cMaxDepots); //TODO not sure about the behavior of this function, I didn't actually test this. std::lock_guard lock(global_mutex); if (!pvecDepots) return 0; @@ -264,14 +264,14 @@ uint32 Steam_Apps::GetInstalledDepots( AppId_t appID, DepotId_t *pvecDepots, uin uint32 Steam_Apps::GetInstalledDepots( DepotId_t *pvecDepots, uint32 cMaxDepots ) { - PRINT_DEBUG("GetInstalledDepots old\n"); + PRINT_DEBUG("Steam_Apps::GetInstalledDepots old\n"); return GetInstalledDepots( settings->get_local_game_id().AppID(), pvecDepots, cMaxDepots ); } // returns current app install folder for AppID, returns folder name length uint32 Steam_Apps::GetAppInstallDir( AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize ) { - PRINT_DEBUG("GetAppInstallDir %u %p %u\n", appID, pchFolder, cchFolderBufferSize); + PRINT_DEBUG("Steam_Apps::GetAppInstallDir %u %p %u\n", appID, pchFolder, cchFolderBufferSize); std::lock_guard lock(global_mutex); //TODO return real path instead of dll path std::string installed_path = settings->getAppInstallPath(appID); @@ -279,7 +279,7 @@ uint32 Steam_Apps::GetAppInstallDir( AppId_t appID, char *pchFolder, uint32 cchF if (installed_path.size() == 0) { std::string dll_path = get_full_program_path(); std::string current_path = get_current_path(); - PRINT_DEBUG("paths %s %s\n", dll_path.c_str(), current_path.c_str()); + PRINT_DEBUG("Steam_Apps::paths %s %s\n", dll_path.c_str(), current_path.c_str()); //Just pick the smallest path, it has the most chances of being the good one if (dll_path.size() > current_path.size() && current_path.size()) { @@ -289,7 +289,7 @@ uint32 Steam_Apps::GetAppInstallDir( AppId_t appID, char *pchFolder, uint32 cchF } } - PRINT_DEBUG("path %s\n", installed_path.c_str()); + PRINT_DEBUG("Steam_Apps::path %s\n", installed_path.c_str()); if (cchFolderBufferSize && pchFolder) { snprintf(pchFolder, cchFolderBufferSize, "%s", installed_path.c_str()); } @@ -302,7 +302,7 @@ uint32 Steam_Apps::GetAppInstallDir( AppId_t appID, char *pchFolder, uint32 cchF // https://partner.steamgames.com/doc/api/ISteamApps bool Steam_Apps::BIsAppInstalled( AppId_t appID ) { - PRINT_DEBUG("BIsAppInstalled %u\n", appID); + PRINT_DEBUG("Steam_Apps::BIsAppInstalled %u\n", appID); std::lock_guard lock(global_mutex); // "0 Base Goldsource Shared Binaries" @@ -324,7 +324,7 @@ bool Steam_Apps::BIsAppInstalled( AppId_t appID ) // returns the SteamID of the original owner. If different from current user, it's borrowed CSteamID Steam_Apps::GetAppOwner() { - PRINT_DEBUG("GetAppOwner\n"); + PRINT_DEBUG("Steam_Apps::GetAppOwner\n"); std::lock_guard lock(global_mutex); return settings->get_local_steam_id(); } @@ -335,7 +335,7 @@ CSteamID Steam_Apps::GetAppOwner() // but it is advised that you not param names beginning with an underscore for your own features. const char *Steam_Apps::GetLaunchQueryParam( const char *pchKey ) { - PRINT_DEBUG("GetLaunchQueryParam\n"); + PRINT_DEBUG("Steam_Apps::GetLaunchQueryParam\n"); return ""; } @@ -343,7 +343,7 @@ const char *Steam_Apps::GetLaunchQueryParam( const char *pchKey ) // get download progress for optional DLC bool Steam_Apps::GetDlcDownloadProgress( AppId_t nAppID, uint64 *punBytesDownloaded, uint64 *punBytesTotal ) { - PRINT_DEBUG("GetDlcDownloadProgress\n"); + PRINT_DEBUG("Steam_Apps::GetDlcDownloadProgress\n"); std::lock_guard lock(global_mutex); return false; } @@ -352,7 +352,7 @@ bool Steam_Apps::GetDlcDownloadProgress( AppId_t nAppID, uint64 *punBytesDownloa // return the buildid of this app, may change at any time based on backend updates to the game int Steam_Apps::GetAppBuildId() { - PRINT_DEBUG("GetAppBuildId\n"); + PRINT_DEBUG("Steam_Apps::GetAppBuildId\n"); std::lock_guard lock(global_mutex); return this->settings->build_id; } @@ -364,7 +364,7 @@ int Steam_Apps::GetAppBuildId() // member is k_uAppIdInvalid (zero). void Steam_Apps::RequestAllProofOfPurchaseKeys() { - PRINT_DEBUG("TODO RequestAllProofOfPurchaseKeys\n"); + PRINT_DEBUG("Steam_Apps::TODO RequestAllProofOfPurchaseKeys\n"); std::lock_guard lock(global_mutex); // current app { @@ -399,7 +399,7 @@ void Steam_Apps::RequestAllProofOfPurchaseKeys() STEAM_CALL_RESULT( FileDetailsResult_t ) SteamAPICall_t Steam_Apps::GetFileDetails( const char* pszFileName ) { - PRINT_DEBUG("GetFileDetails %s\n", pszFileName); + PRINT_DEBUG("Steam_Apps::GetFileDetails %s\n", pszFileName); FileDetailsResult_t data = {}; //TODO? this function should only return found if file is actually part of the steam depots if (file_exists_(pszFileName)) { @@ -428,14 +428,14 @@ SteamAPICall_t Steam_Apps::GetFileDetails( const char* pszFileName ) // If game was already running and launched again, the NewUrlLaunchParameters_t will be fired. int Steam_Apps::GetLaunchCommandLine( char *pszCommandLine, int cubCommandLine ) { - PRINT_DEBUG("TODO GetLaunchCommandLine\n"); + PRINT_DEBUG("Steam_Apps::TODO GetLaunchCommandLine\n"); return 0; } // Check if user borrowed this game via Family Sharing, If true, call GetAppOwner() to get the lender SteamID bool Steam_Apps::BIsSubscribedFromFamilySharing() { - PRINT_DEBUG("BIsSubscribedFromFamilySharing\n"); + PRINT_DEBUG("Steam_Apps::BIsSubscribedFromFamilySharing\n"); std::lock_guard lock(global_mutex); return false; } @@ -443,7 +443,7 @@ bool Steam_Apps::BIsSubscribedFromFamilySharing() // check if game is a timed trial with limited playtime bool Steam_Apps::BIsTimedTrial( uint32* punSecondsAllowed, uint32* punSecondsPlayed ) { - PRINT_DEBUG("BIsTimedTrial\n"); + PRINT_DEBUG("Steam_Apps::BIsTimedTrial\n"); std::lock_guard lock(global_mutex); return false; } @@ -451,7 +451,7 @@ bool Steam_Apps::BIsTimedTrial( uint32* punSecondsAllowed, uint32* punSecondsPla // set current DLC AppID being played (or 0 if none). Allows Steam to track usage of major DLC extensions bool Steam_Apps::SetDlcContext( AppId_t nAppID ) { - PRINT_DEBUG("SetDlcContext %u\n", nAppID); + PRINT_DEBUG("Steam_Apps::SetDlcContext %u\n", nAppID); std::lock_guard lock(global_mutex); return true; } diff --git a/dll/steam_gameserver.cpp b/dll/steam_gameserver.cpp index a03a8044..8014dff9 100644 --- a/dll/steam_gameserver.cpp +++ b/dll/steam_gameserver.cpp @@ -47,7 +47,7 @@ std::vector>* Steam_GameServer::ge /// This is called by SteamGameServer_Init, and you will usually not need to call it directly bool Steam_GameServer::InitGameServer( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char *pchVersionString ) { - PRINT_DEBUG("InitGameServer\n"); + PRINT_DEBUG("Steam_GameServer::InitGameServer\n"); std::lock_guard lock(global_mutex); if (logged_in) return false; // may not be changed after logged in. @@ -59,7 +59,7 @@ bool Steam_GameServer::InitGameServer( uint32 unIP, uint16 usGamePort, uint16 us try { server_data.set_version(std::stoi(version)); } catch (...) { - PRINT_DEBUG("InitGameServer: not a number: %s\n", pchVersionString); + PRINT_DEBUG("Steam_GameServer::InitGameServer: not a number: %s\n", pchVersionString); server_data.set_version(0); } @@ -86,7 +86,7 @@ bool Steam_GameServer::InitGameServer( uint32 unIP, uint16 usGamePort, uint16 us /// It's a required field, but will eventually will go away, and the AppID will be used for this purpose. void Steam_GameServer::SetProduct( const char *pszProduct ) { - PRINT_DEBUG("SetProduct\n"); + PRINT_DEBUG("Steam_GameServer::SetProduct\n"); std::lock_guard lock(global_mutex); // pszGameDescription should be used instead of pszProduct for accurate information // Example: 'Counter-Strike: Source' instead of 'cstrike' @@ -98,7 +98,7 @@ void Steam_GameServer::SetProduct( const char *pszProduct ) /// This is a required field, but it will go away eventually, as the data should be determined from the AppID. void Steam_GameServer::SetGameDescription( const char *pszGameDescription ) { - PRINT_DEBUG("SetGameDescription\n"); + PRINT_DEBUG("Steam_GameServer::SetGameDescription\n"); std::lock_guard lock(global_mutex); server_data.set_game_description(pszGameDescription); //server_data.set_product(pszGameDescription); @@ -111,7 +111,7 @@ void Steam_GameServer::SetGameDescription( const char *pszGameDescription ) /// @see k_cbMaxGameServerGameDir void Steam_GameServer::SetModDir( const char *pszModDir ) { - PRINT_DEBUG("SetModDir\n"); + PRINT_DEBUG("Steam_GameServer::SetModDir\n"); std::lock_guard lock(global_mutex); server_data.set_mod_dir(pszModDir); } @@ -120,7 +120,7 @@ void Steam_GameServer::SetModDir( const char *pszModDir ) /// Is this is a dedicated server? The default value is false. void Steam_GameServer::SetDedicatedServer( bool bDedicated ) { - PRINT_DEBUG("SetDedicatedServer\n"); + PRINT_DEBUG("Steam_GameServer::SetDedicatedServer\n"); std::lock_guard lock(global_mutex); server_data.set_dedicated_server(bDedicated); } @@ -138,7 +138,7 @@ void Steam_GameServer::SetDedicatedServer( bool bDedicated ) /// @see SteamServersDisconnected_t void Steam_GameServer::LogOn( const char *pszToken ) { - PRINT_DEBUG("LogOn %s\n", pszToken); + PRINT_DEBUG("Steam_GameServer::LogOn %s\n", pszToken); std::lock_guard lock(global_mutex); call_servers_connected = true; logged_in = true; @@ -149,7 +149,7 @@ void Steam_GameServer::LogOn( const char *pszPassword ) { - PRINT_DEBUG("LogOn %s %s\n", pszAccountName, pszPassword); + PRINT_DEBUG("Steam_GameServer::LogOn %s %s\n", pszAccountName, pszPassword); LogOn(pszAccountName); } @@ -159,7 +159,7 @@ void Steam_GameServer::LogOn( /// but this is no longer the case. void Steam_GameServer::LogOnAnonymous() { - PRINT_DEBUG("LogOnAnonymous\n"); + PRINT_DEBUG("Steam_GameServer::LogOnAnonymous\n"); std::lock_guard lock(global_mutex); call_servers_connected = true; logged_in = true; @@ -167,14 +167,14 @@ void Steam_GameServer::LogOnAnonymous() void Steam_GameServer::LogOn() { - PRINT_DEBUG("LogOn\n"); + PRINT_DEBUG("Steam_GameServer::LogOn\n"); LogOnAnonymous(); } /// Begin process of logging game server out of steam void Steam_GameServer::LogOff() { - PRINT_DEBUG("LogOff\n"); + PRINT_DEBUG("Steam_GameServer::LogOff\n"); std::lock_guard lock(global_mutex); if (logged_in) { call_servers_disconnected = true; @@ -194,7 +194,7 @@ bool Steam_GameServer::BLoggedOn() bool Steam_GameServer::BSecure() { - PRINT_DEBUG("BSecure\n"); + PRINT_DEBUG("Steam_GameServer::BSecure\n"); std::lock_guard lock(global_mutex); if (!policy_response_called) { server_data.set_secure(0); @@ -218,7 +218,7 @@ CSteamID Steam_GameServer::GetSteamID() /// Only returns true once per request. bool Steam_GameServer::WasRestartRequested() { - PRINT_DEBUG("WasRestartRequested\n"); + PRINT_DEBUG("Steam_GameServer::WasRestartRequested\n"); std::lock_guard lock(global_mutex); return false; } @@ -231,7 +231,7 @@ bool Steam_GameServer::WasRestartRequested() /// Max player count that will be reported to server browser and client queries void Steam_GameServer::SetMaxPlayerCount( int cPlayersMax ) { - PRINT_DEBUG("SetMaxPlayerCount\n"); + PRINT_DEBUG("Steam_GameServer::SetMaxPlayerCount\n"); std::lock_guard lock(global_mutex); server_data.set_max_player_count(cPlayersMax); } @@ -240,7 +240,7 @@ void Steam_GameServer::SetMaxPlayerCount( int cPlayersMax ) /// Number of bots. Default value is zero void Steam_GameServer::SetBotPlayerCount( int cBotplayers ) { - PRINT_DEBUG("SetBotPlayerCount\n"); + PRINT_DEBUG("Steam_GameServer::SetBotPlayerCount\n"); std::lock_guard lock(global_mutex); server_data.set_bot_player_count(cBotplayers); } @@ -251,7 +251,7 @@ void Steam_GameServer::SetBotPlayerCount( int cBotplayers ) /// @see k_cbMaxGameServerName void Steam_GameServer::SetServerName( const char *pszServerName ) { - PRINT_DEBUG("SetServerName\n"); + PRINT_DEBUG("Steam_GameServer::SetServerName\n"); std::lock_guard lock(global_mutex); server_data.set_server_name(pszServerName); } @@ -262,7 +262,7 @@ void Steam_GameServer::SetServerName( const char *pszServerName ) /// @see k_cbMaxGameServerName void Steam_GameServer::SetMapName( const char *pszMapName ) { - PRINT_DEBUG("SetMapName\n"); + PRINT_DEBUG("Steam_GameServer::SetMapName\n"); std::lock_guard lock(global_mutex); server_data.set_map_name(pszMapName); } @@ -271,7 +271,7 @@ void Steam_GameServer::SetMapName( const char *pszMapName ) /// Let people know if your server will require a password void Steam_GameServer::SetPasswordProtected( bool bPasswordProtected ) { - PRINT_DEBUG("SetPasswordProtected\n"); + PRINT_DEBUG("Steam_GameServer::SetPasswordProtected\n"); std::lock_guard lock(global_mutex); server_data.set_password_protected(bPasswordProtected); } @@ -281,7 +281,7 @@ void Steam_GameServer::SetPasswordProtected( bool bPasswordProtected ) /// is not used. void Steam_GameServer::SetSpectatorPort( uint16 unSpectatorPort ) { - PRINT_DEBUG("SetSpectatorPort\n"); + PRINT_DEBUG("Steam_GameServer::SetSpectatorPort\n"); std::lock_guard lock(global_mutex); server_data.set_spectator_port(unSpectatorPort); } @@ -292,7 +292,7 @@ void Steam_GameServer::SetSpectatorPort( uint16 unSpectatorPort ) /// @see k_cbMaxGameServerMapName void Steam_GameServer::SetSpectatorServerName( const char *pszSpectatorServerName ) { - PRINT_DEBUG("SetSpectatorServerName\n"); + PRINT_DEBUG("Steam_GameServer::SetSpectatorServerName\n"); std::lock_guard lock(global_mutex); server_data.set_spectator_server_name(pszSpectatorServerName); } @@ -301,7 +301,7 @@ void Steam_GameServer::SetSpectatorServerName( const char *pszSpectatorServerNam /// Call this to clear the whole list of key/values that are sent in rules queries. void Steam_GameServer::ClearAllKeyValues() { - PRINT_DEBUG("ClearAllKeyValues\n"); + PRINT_DEBUG("Steam_GameServer::ClearAllKeyValues\n"); std::lock_guard lock(global_mutex); server_data.clear_values(); } @@ -310,7 +310,7 @@ void Steam_GameServer::ClearAllKeyValues() /// Call this to add/update a key/value pair. void Steam_GameServer::SetKeyValue( const char *pKey, const char *pValue ) { - PRINT_DEBUG("SetKeyValue %s %s\n", pKey, pValue); + PRINT_DEBUG("Steam_GameServer::SetKeyValue %s %s\n", pKey, pValue); std::lock_guard lock(global_mutex); (*server_data.mutable_values())[std::string(pKey)] = std::string(pValue); } @@ -322,7 +322,7 @@ void Steam_GameServer::SetKeyValue( const char *pKey, const char *pValue ) /// @see k_cbMaxGameServerTags void Steam_GameServer::SetGameTags( const char *pchGameTags ) { - PRINT_DEBUG("SetGameTags\n"); + PRINT_DEBUG("Steam_GameServer::SetGameTags\n"); std::lock_guard lock(global_mutex); server_data.set_tags(pchGameTags); } @@ -336,7 +336,7 @@ void Steam_GameServer::SetGameTags( const char *pchGameTags ) /// @see k_cbMaxGameServerGameData void Steam_GameServer::SetGameData( const char *pchGameData ) { - PRINT_DEBUG("SetGameData\n"); + PRINT_DEBUG("Steam_GameServer::SetGameData\n"); std::lock_guard lock(global_mutex); server_data.set_gamedata(pchGameData); } @@ -345,7 +345,7 @@ void Steam_GameServer::SetGameData( const char *pchGameData ) /// Region identifier. This is an optional field, the default value is empty, meaning the "world" region void Steam_GameServer::SetRegion( const char *pszRegion ) { - PRINT_DEBUG("SetRegion\n"); + PRINT_DEBUG("Steam_GameServer::SetRegion\n"); std::lock_guard lock(global_mutex); server_data.set_region(pszRegion); } @@ -366,7 +366,7 @@ void Steam_GameServer::SetRegion( const char *pszRegion ) // for the user has succeeded or failed (the steamid in the callback will match the one returned by this call) bool Steam_GameServer::SendUserConnectAndAuthenticate( uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser ) { - PRINT_DEBUG("SendUserConnectAndAuthenticate %u %u\n", unIPClient, cubAuthBlobSize); + PRINT_DEBUG("Steam_GameServer::SendUserConnectAndAuthenticate %u %u\n", unIPClient, cubAuthBlobSize); std::lock_guard lock(global_mutex); bool res = auth_manager->SendUserConnectAndAuthenticate(unIPClient, pvAuthBlob, cubAuthBlobSize, pSteamIDUser); @@ -394,7 +394,7 @@ void Steam_GameServer::SendUserConnectAndAuthenticate( CSteamID steamIDUser, uin // when this user leaves the server just like you would for a real user. CSteamID Steam_GameServer::CreateUnauthenticatedUserConnection() { - PRINT_DEBUG("CreateUnauthenticatedUserConnection\n"); + PRINT_DEBUG("Steam_GameServer::CreateUnauthenticatedUserConnection\n"); std::lock_guard lock(global_mutex); CSteamID bot_id = auth_manager->fakeUser(); @@ -414,7 +414,7 @@ CSteamID Steam_GameServer::CreateUnauthenticatedUserConnection() // account being logged into multiple servers, showing who is currently on a server, etc. void Steam_GameServer::SendUserDisconnect( CSteamID steamIDUser ) { - PRINT_DEBUG("SendUserDisconnect\n"); + PRINT_DEBUG("Steam_GameServer::SendUserDisconnect\n"); std::lock_guard lock(global_mutex); auto player_it = std::find_if(players.begin(), players.end(), [&steamIDUser](std::pair& player) @@ -438,7 +438,7 @@ void Steam_GameServer::SendUserDisconnect( CSteamID steamIDUser ) // Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player) bool Steam_GameServer::BUpdateUserData( CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore ) { - PRINT_DEBUG("BUpdateUserData %llu %s %u\n", steamIDUser.ConvertToUint64(), pchPlayerName, uScore); + PRINT_DEBUG("Steam_GameServer::BUpdateUserData %llu %s %u\n", steamIDUser.ConvertToUint64(), pchPlayerName, uScore); std::lock_guard lock(global_mutex); auto player_it = std::find_if(players.begin(), players.end(), [&steamIDUser](std::pair& player) @@ -476,7 +476,7 @@ bool Steam_GameServer::BUpdateUserData( CSteamID steamIDUser, const char *pchPla bool Steam_GameServer::BSetServerType( uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, uint16 unSpectatorPort, uint16 usQueryPort, const char *pchGameDir, const char *pchVersion, bool bLANMode ) { - PRINT_DEBUG("BSetServerType\n"); + PRINT_DEBUG("Steam_GameServer::BSetServerType\n"); std::lock_guard lock(global_mutex); server_data.set_ip(unGameIP); server_data.set_port(unGamePort); @@ -504,7 +504,7 @@ void Steam_GameServer::UpdateServerStatus( int cPlayers, int cPlayersMax, int cB const char *pchServerName, const char *pSpectatorServerName, const char *pchMapName ) { - PRINT_DEBUG("UpdateServerStatus\n"); + PRINT_DEBUG("Steam_GameServer::UpdateServerStatus\n"); std::lock_guard lock(global_mutex); server_data.set_num_players(cPlayers); server_data.set_max_player_count(cPlayersMax); @@ -517,7 +517,7 @@ void Steam_GameServer::UpdateServerStatus( int cPlayers, int cPlayersMax, int cB // This can be called if spectator goes away or comes back (passing 0 means there is no spectator server now). void Steam_GameServer::UpdateSpectatorPort( uint16 unSpectatorPort ) { - PRINT_DEBUG("UpdateSpectatorPort\n"); + PRINT_DEBUG("Steam_GameServer::UpdateSpectatorPort\n"); SetSpectatorPort(unSpectatorPort); } @@ -525,14 +525,14 @@ void Steam_GameServer::UpdateSpectatorPort( uint16 unSpectatorPort ) // it allows users to filter in the matchmaking/server-browser interfaces based on the value void Steam_GameServer::SetGameType( const char *pchGameType ) { - PRINT_DEBUG("SetGameType\n"); + PRINT_DEBUG("Steam_GameServer::SetGameType\n"); std::lock_guard lock(global_mutex); } // Ask if a user has a specific achievement for this game, will get a callback on reply bool Steam_GameServer::BGetUserAchievementStatus( CSteamID steamID, const char *pchAchievementName ) { - PRINT_DEBUG("BGetUserAchievementStatus\n"); + PRINT_DEBUG("Steam_GameServer::BGetUserAchievementStatus\n"); std::lock_guard lock(global_mutex); return false; } @@ -622,7 +622,7 @@ EUserHasLicenseForAppResult Steam_GameServer::UserHasLicenseForApp( CSteamID ste // returns false if we're not connected to the steam servers and thus cannot ask bool Steam_GameServer::RequestUserGroupStatus( CSteamID steamIDUser, CSteamID steamIDGroup ) { - PRINT_DEBUG("RequestUserGroupStatus\n"); + PRINT_DEBUG("Steam_GameServer::RequestUserGroupStatus\n"); std::lock_guard lock(global_mutex); return true; } @@ -633,14 +633,14 @@ bool Steam_GameServer::RequestUserGroupStatus( CSteamID steamIDUser, CSteamID st // they will be removed in a future version of the SDK void Steam_GameServer::GetGameplayStats( ) { - PRINT_DEBUG("GetGameplayStats\n"); + PRINT_DEBUG("Steam_GameServer::GetGameplayStats\n"); std::lock_guard lock(global_mutex); } STEAM_CALL_RESULT( GSReputation_t ) SteamAPICall_t Steam_GameServer::GetServerReputation() { - PRINT_DEBUG("GetServerReputation\n"); + PRINT_DEBUG("Steam_GameServer::GetServerReputation\n"); std::lock_guard lock(global_mutex); return 0; } @@ -651,16 +651,16 @@ SteamAPICall_t Steam_GameServer::GetServerReputation() // connect to uint32 Steam_GameServer::GetPublicIP_old() { - PRINT_DEBUG("GetPublicIP_old\n"); + PRINT_DEBUG("Steam_GameServer::GetPublicIP_old\n"); std::lock_guard lock(global_mutex); uint32 ip = network->getOwnIP(); - PRINT_DEBUG("%X\n", ip); + PRINT_DEBUG(" %X\n", ip); return ip; } SteamIPAddress_t Steam_GameServer::GetPublicIP() { - PRINT_DEBUG("GetPublicIP\n"); + PRINT_DEBUG("Steam_GameServer::GetPublicIP\n"); SteamIPAddress_t ip = SteamIPAddress_t::IPv4Any(); ip.m_unIPv4 = GetPublicIP_old(); return ip; @@ -668,7 +668,7 @@ SteamIPAddress_t Steam_GameServer::GetPublicIP() void Steam_GameServer::GetPublicIP_fix(SteamIPAddress_t *out) { - PRINT_DEBUG("GetPublicIP_fix\n"); + PRINT_DEBUG("Steam_GameServer::GetPublicIP_fix\n"); if (out) *out = GetPublicIP(); } @@ -689,7 +689,7 @@ void Steam_GameServer::GetPublicIP_fix(SteamIPAddress_t *out) // it's for us. bool Steam_GameServer::HandleIncomingPacket( const void *pData, int cbData, uint32 srcIP, uint16 srcPort ) { - PRINT_DEBUG("HandleIncomingPacket %i %X %i\n", cbData, srcIP, srcPort); + PRINT_DEBUG("Steam_GameServer::HandleIncomingPacket %i %X %i\n", cbData, srcIP, srcPort); std::lock_guard lock(global_mutex); if (settings->disable_source_query) return true; @@ -713,7 +713,7 @@ bool Steam_GameServer::HandleIncomingPacket( const void *pData, int cbData, uint // Call this each frame until it returns 0. int Steam_GameServer::GetNextOutgoingPacket( void *pOut, int cbMaxOut, uint32 *pNetAdr, uint16 *pPort ) { - PRINT_DEBUG("GetNextOutgoingPacket\n"); + PRINT_DEBUG("Steam_GameServer::GetNextOutgoingPacket\n"); std::lock_guard lock(global_mutex); if (settings->disable_source_query) return 0; if (outgoing_packets.size() == 0) return 0; @@ -735,7 +735,7 @@ int Steam_GameServer::GetNextOutgoingPacket( void *pOut, int cbMaxOut, uint32 *p // you want it to be active (default: off). void Steam_GameServer::EnableHeartbeats( bool bActive ) { - PRINT_DEBUG("EnableHeartbeats\n"); + PRINT_DEBUG("Steam_GameServer::EnableHeartbeats\n"); } /// Indicate whether you wish to be listed on the master server list @@ -748,7 +748,7 @@ void Steam_GameServer::EnableHeartbeats( bool bActive ) /// the old name was just confusing.) void Steam_GameServer::SetAdvertiseServerActive( bool bActive ) { - PRINT_DEBUG("SetAdvertiseServerActive\n"); + PRINT_DEBUG("Steam_GameServer::SetAdvertiseServerActive\n"); EnableHeartbeats(bActive); } @@ -757,24 +757,24 @@ void Steam_GameServer::SetAdvertiseServerActive( bool bActive ) // Some mods change this. void Steam_GameServer::SetHeartbeatInterval( int iHeartbeatInterval ) { - PRINT_DEBUG("SetHeartbeatInterval\n"); + PRINT_DEBUG("Steam_GameServer::SetHeartbeatInterval\n"); } void Steam_GameServer::SetMasterServerHeartbeatInterval_DEPRECATED( int iHeartbeatInterval ) { - PRINT_DEBUG("SetMasterServerHeartbeatInterval_DEPRECATED\n"); + PRINT_DEBUG("Steam_GameServer::SetMasterServerHeartbeatInterval_DEPRECATED\n"); } // Force a heartbeat to steam at the next opportunity void Steam_GameServer::ForceHeartbeat() { - PRINT_DEBUG("ForceHeartbeat\n"); + PRINT_DEBUG("Steam_GameServer::ForceHeartbeat\n"); } void Steam_GameServer::ForceMasterServerHeartbeat_DEPRECATED() { - PRINT_DEBUG("ForceMasterServerHeartbeat_DEPRECATED\n"); + PRINT_DEBUG("Steam_GameServer::ForceMasterServerHeartbeat_DEPRECATED\n"); } @@ -782,7 +782,7 @@ void Steam_GameServer::ForceMasterServerHeartbeat_DEPRECATED() STEAM_CALL_RESULT( AssociateWithClanResult_t ) SteamAPICall_t Steam_GameServer::AssociateWithClan( CSteamID steamIDClan ) { - PRINT_DEBUG("AssociateWithClan\n"); + PRINT_DEBUG("Steam_GameServer::AssociateWithClan\n"); std::lock_guard lock(global_mutex); return 0; } @@ -792,7 +792,7 @@ SteamAPICall_t Steam_GameServer::AssociateWithClan( CSteamID steamIDClan ) STEAM_CALL_RESULT( ComputeNewPlayerCompatibilityResult_t ) SteamAPICall_t Steam_GameServer::ComputeNewPlayerCompatibility( CSteamID steamIDNewPlayer ) { - PRINT_DEBUG("ComputeNewPlayerCompatibility\n"); + PRINT_DEBUG("Steam_GameServer::ComputeNewPlayerCompatibility\n"); std::lock_guard lock(global_mutex); return 0; } diff --git a/dll/steam_gameserverstats.cpp b/dll/steam_gameserverstats.cpp index 84497394..76a82826 100644 --- a/dll/steam_gameserverstats.cpp +++ b/dll/steam_gameserverstats.cpp @@ -33,7 +33,7 @@ Steam_GameServerStats::Steam_GameServerStats(class Settings *settings, class Net STEAM_CALL_RESULT( GSStatsReceived_t ) SteamAPICall_t Steam_GameServerStats::RequestUserStats( CSteamID steamIDUser ) { - PRINT_DEBUG("RequestUserStats\n"); + PRINT_DEBUG("Steam_GameServerStats::RequestUserStats\n"); std::lock_guard lock(global_mutex); GSStatsReceived_t data; @@ -46,19 +46,19 @@ SteamAPICall_t Steam_GameServerStats::RequestUserStats( CSteamID steamIDUser ) // requests stat information for a user, usable after a successful call to RequestUserStats() bool Steam_GameServerStats::GetUserStat( CSteamID steamIDUser, const char *pchName, int32 *pData ) { - PRINT_DEBUG("GetUserStat\n"); + PRINT_DEBUG("Steam_GameServerStats::GetUserStat\n"); return false; } bool Steam_GameServerStats::GetUserStat( CSteamID steamIDUser, const char *pchName, float *pData ) { - PRINT_DEBUG("GetUserStat\n"); + PRINT_DEBUG("Steam_GameServerStats::GetUserStat\n"); return false; } bool Steam_GameServerStats::GetUserAchievement( CSteamID steamIDUser, const char *pchName, bool *pbAchieved ) { - PRINT_DEBUG("GetUserAchievement\n"); + PRINT_DEBUG("Steam_GameServerStats::GetUserAchievement\n"); return false; } @@ -69,32 +69,32 @@ bool Steam_GameServerStats::GetUserAchievement( CSteamID steamIDUser, const char // Set the IP range of your official servers on the Steamworks page bool Steam_GameServerStats::SetUserStat( CSteamID steamIDUser, const char *pchName, int32 nData ) { - PRINT_DEBUG("SetUserStat\n"); + PRINT_DEBUG("Steam_GameServerStats::SetUserStat\n"); return false; } bool Steam_GameServerStats::SetUserStat( CSteamID steamIDUser, const char *pchName, float fData ) { - PRINT_DEBUG("SetUserStat\n"); + PRINT_DEBUG("Steam_GameServerStats::SetUserStat\n"); return false; } bool Steam_GameServerStats::UpdateUserAvgRateStat( CSteamID steamIDUser, const char *pchName, float flCountThisSession, double dSessionLength ) { - PRINT_DEBUG("UpdateUserAvgRateStat\n"); + PRINT_DEBUG("Steam_GameServerStats::UpdateUserAvgRateStat\n"); return false; } bool Steam_GameServerStats::SetUserAchievement( CSteamID steamIDUser, const char *pchName ) { - PRINT_DEBUG("SetUserAchievement\n"); + PRINT_DEBUG("Steam_GameServerStats::SetUserAchievement\n"); return false; } bool Steam_GameServerStats::ClearUserAchievement( CSteamID steamIDUser, const char *pchName ) { - PRINT_DEBUG("ClearUserAchievement\n"); + PRINT_DEBUG("Steam_GameServerStats::ClearUserAchievement\n"); return false; } @@ -108,7 +108,7 @@ bool Steam_GameServerStats::ClearUserAchievement( CSteamID steamIDUser, const ch STEAM_CALL_RESULT( GSStatsStored_t ) SteamAPICall_t Steam_GameServerStats::StoreUserStats( CSteamID steamIDUser ) { - PRINT_DEBUG("StoreUserStats\n"); + PRINT_DEBUG("Steam_GameServerStats::StoreUserStats\n"); std::lock_guard lock(global_mutex); GSStatsStored_t data; diff --git a/dll/steam_http.cpp b/dll/steam_http.cpp index 4e8de131..09b355cd 100644 --- a/dll/steam_http.cpp +++ b/dll/steam_http.cpp @@ -38,7 +38,7 @@ Steam_Http_Request *Steam_HTTP::get_request(HTTPRequestHandle hRequest) // or such. HTTPRequestHandle Steam_HTTP::CreateHTTPRequest( EHTTPMethod eHTTPRequestMethod, const char *pchAbsoluteURL ) { - PRINT_DEBUG("CreateHTTPRequest %i %s\n", eHTTPRequestMethod, pchAbsoluteURL); + PRINT_DEBUG("Steam_HTTP::CreateHTTPRequest %i %s\n", eHTTPRequestMethod, pchAbsoluteURL); if (!pchAbsoluteURL) return INVALID_HTTPREQUEST_HANDLE; std::string url = pchAbsoluteURL; unsigned url_index = 0; @@ -111,7 +111,7 @@ HTTPRequestHandle Steam_HTTP::CreateHTTPRequest( EHTTPMethod eHTTPRequestMethod, // sending the request. This is just so the caller can easily keep track of which callbacks go with which request data. bool Steam_HTTP::SetHTTPRequestContextValue( HTTPRequestHandle hRequest, uint64 ulContextValue ) { - PRINT_DEBUG("SetHTTPRequestContextValue\n"); + PRINT_DEBUG("Steam_HTTP::SetHTTPRequestContextValue\n"); Steam_Http_Request *request = get_request(hRequest); if (!request) { return false; @@ -127,7 +127,7 @@ bool Steam_HTTP::SetHTTPRequestContextValue( HTTPRequestHandle hRequest, uint64 // has already been sent. bool Steam_HTTP::SetHTTPRequestNetworkActivityTimeout( HTTPRequestHandle hRequest, uint32 unTimeoutSeconds ) { - PRINT_DEBUG("SetHTTPRequestNetworkActivityTimeout\n"); + PRINT_DEBUG("Steam_HTTP::SetHTTPRequestNetworkActivityTimeout\n"); Steam_Http_Request *request = get_request(hRequest); if (!request) { return false; @@ -141,7 +141,7 @@ bool Steam_HTTP::SetHTTPRequestNetworkActivityTimeout( HTTPRequestHandle hReques // return false if the handle is invalid or the request is already sent. bool Steam_HTTP::SetHTTPRequestHeaderValue( HTTPRequestHandle hRequest, const char *pchHeaderName, const char *pchHeaderValue ) { - PRINT_DEBUG("SetHTTPRequestHeaderValue %s %s\n", pchHeaderName, pchHeaderValue); + PRINT_DEBUG("Steam_HTTP::SetHTTPRequestHeaderValue %s %s\n", pchHeaderName, pchHeaderValue); Steam_Http_Request *request = get_request(hRequest); if (!request) { return false; @@ -156,7 +156,7 @@ bool Steam_HTTP::SetHTTPRequestHeaderValue( HTTPRequestHandle hRequest, const ch // handle is invalid or the request is already sent. bool Steam_HTTP::SetHTTPRequestGetOrPostParameter( HTTPRequestHandle hRequest, const char *pchParamName, const char *pchParamValue ) { - PRINT_DEBUG("SetHTTPRequestGetOrPostParameter\n"); + PRINT_DEBUG("Steam_HTTP::SetHTTPRequestGetOrPostParameter\n"); Steam_Http_Request *request = get_request(hRequest); if (!request) { return false; @@ -173,7 +173,7 @@ bool Steam_HTTP::SetHTTPRequestGetOrPostParameter( HTTPRequestHandle hRequest, c // header and only do a local cache lookup rather than sending any actual remote request. bool Steam_HTTP::SendHTTPRequest( HTTPRequestHandle hRequest, SteamAPICall_t *pCallHandle ) { - PRINT_DEBUG("SendHTTPRequest %u %p\n", hRequest, pCallHandle); + PRINT_DEBUG("Steam_HTTP::SendHTTPRequest %u %p\n", hRequest, pCallHandle); Steam_Http_Request *request = get_request(hRequest); if (!request) { return false; @@ -205,7 +205,7 @@ bool Steam_HTTP::SendHTTPRequest( HTTPRequestHandle hRequest, SteamAPICall_t *pC // HTTPRequestDataReceived_t callbacks while streaming. bool Steam_HTTP::SendHTTPRequestAndStreamResponse( HTTPRequestHandle hRequest, SteamAPICall_t *pCallHandle ) { - PRINT_DEBUG("SendHTTPRequestAndStreamResponse\n"); + PRINT_DEBUG("Steam_HTTP::SendHTTPRequestAndStreamResponse\n"); return false; } @@ -214,7 +214,7 @@ bool Steam_HTTP::SendHTTPRequestAndStreamResponse( HTTPRequestHandle hRequest, S // the specified request to the tail of the queue. Returns false on invalid handle, or if the request is not yet sent. bool Steam_HTTP::DeferHTTPRequest( HTTPRequestHandle hRequest ) { - PRINT_DEBUG("DeferHTTPRequest\n"); + PRINT_DEBUG("Steam_HTTP::DeferHTTPRequest\n"); Steam_Http_Request *request = get_request(hRequest); if (!request) { return false; @@ -228,7 +228,7 @@ bool Steam_HTTP::DeferHTTPRequest( HTTPRequestHandle hRequest ) // the specified request to the head of the queue. Returns false on invalid handle, or if the request is not yet sent. bool Steam_HTTP::PrioritizeHTTPRequest( HTTPRequestHandle hRequest ) { - PRINT_DEBUG("PrioritizeHTTPRequest\n"); + PRINT_DEBUG("Steam_HTTP::PrioritizeHTTPRequest\n"); Steam_Http_Request *request = get_request(hRequest); if (!request) { return false; @@ -243,7 +243,7 @@ bool Steam_HTTP::PrioritizeHTTPRequest( HTTPRequestHandle hRequest ) // GetHTTPResponseHeaderValue. bool Steam_HTTP::GetHTTPResponseHeaderSize( HTTPRequestHandle hRequest, const char *pchHeaderName, uint32 *unResponseHeaderSize ) { - PRINT_DEBUG("GetHTTPResponseHeaderSize\n"); + PRINT_DEBUG("Steam_HTTP::GetHTTPResponseHeaderSize\n"); return false; } @@ -253,7 +253,7 @@ bool Steam_HTTP::GetHTTPResponseHeaderSize( HTTPRequestHandle hRequest, const ch // BGetHTTPResponseHeaderSize to check for the presence of the header and to find out the size buffer needed. bool Steam_HTTP::GetHTTPResponseHeaderValue( HTTPRequestHandle hRequest, const char *pchHeaderName, uint8 *pHeaderValueBuffer, uint32 unBufferSize ) { - PRINT_DEBUG("GetHTTPResponseHeaderValue\n"); + PRINT_DEBUG("Steam_HTTP::GetHTTPResponseHeaderValue\n"); return false; } @@ -262,7 +262,7 @@ bool Steam_HTTP::GetHTTPResponseHeaderValue( HTTPRequestHandle hRequest, const c // handle is invalid. bool Steam_HTTP::GetHTTPResponseBodySize( HTTPRequestHandle hRequest, uint32 *unBodySize ) { - PRINT_DEBUG("GetHTTPResponseBodySize\n"); + PRINT_DEBUG("Steam_HTTP::GetHTTPResponseBodySize\n"); Steam_Http_Request *request = get_request(hRequest); if (!request) { return false; @@ -278,7 +278,7 @@ bool Steam_HTTP::GetHTTPResponseBodySize( HTTPRequestHandle hRequest, uint32 *un // the correct buffer size to use. bool Steam_HTTP::GetHTTPResponseBodyData( HTTPRequestHandle hRequest, uint8 *pBodyDataBuffer, uint32 unBufferSize ) { - PRINT_DEBUG("GetHTTPResponseBodyData\n"); + PRINT_DEBUG("Steam_HTTP::GetHTTPResponseBodyData\n"); Steam_Http_Request *request = get_request(hRequest); if (!request) { return false; @@ -298,7 +298,7 @@ bool Steam_HTTP::GetHTTPResponseBodyData( HTTPRequestHandle hRequest, uint8 *pBo // do not match the size and offset sent in HTTPRequestDataReceived_t. bool Steam_HTTP::GetHTTPStreamingResponseBodyData( HTTPRequestHandle hRequest, uint32 cOffset, uint8 *pBodyDataBuffer, uint32 unBufferSize ) { - PRINT_DEBUG("GetHTTPStreamingResponseBodyData\n"); + PRINT_DEBUG("Steam_HTTP::GetHTTPStreamingResponseBodyData\n"); return false; } @@ -307,7 +307,7 @@ bool Steam_HTTP::GetHTTPStreamingResponseBodyData( HTTPRequestHandle hRequest, u // callback and finishing using the response. bool Steam_HTTP::ReleaseHTTPRequest( HTTPRequestHandle hRequest ) { - PRINT_DEBUG("ReleaseHTTPRequest\n"); + PRINT_DEBUG("Steam_HTTP::ReleaseHTTPRequest\n"); std::lock_guard lock(global_mutex); auto c = std::begin(requests); @@ -329,7 +329,7 @@ bool Steam_HTTP::ReleaseHTTPRequest( HTTPRequestHandle hRequest ) // zero for the duration of the request as the size is unknown until the connection closes. bool Steam_HTTP::GetHTTPDownloadProgressPct( HTTPRequestHandle hRequest, float *pflPercentOut ) { - PRINT_DEBUG("GetHTTPDownloadProgressPct\n"); + PRINT_DEBUG("Steam_HTTP::GetHTTPDownloadProgressPct\n"); return false; } @@ -339,7 +339,7 @@ bool Steam_HTTP::GetHTTPDownloadProgressPct( HTTPRequestHandle hRequest, float * // parameter will set the content-type header for the request so the server may know how to interpret the body. bool Steam_HTTP::SetHTTPRequestRawPostBody( HTTPRequestHandle hRequest, const char *pchContentType, uint8 *pubBody, uint32 unBodyLen ) { - PRINT_DEBUG("SetHTTPRequestRawPostBody %s\n", pchContentType); + PRINT_DEBUG("Steam_HTTP::SetHTTPRequestRawPostBody %s\n", pchContentType); Steam_Http_Request *request = get_request(hRequest); if (!request) { return false; @@ -356,7 +356,7 @@ bool Steam_HTTP::SetHTTPRequestRawPostBody( HTTPRequestHandle hRequest, const ch // repeat executions of your process. HTTPCookieContainerHandle Steam_HTTP::CreateCookieContainer( bool bAllowResponsesToModify ) { - PRINT_DEBUG("CreateCookieContainer\n"); + PRINT_DEBUG("Steam_HTTP::CreateCookieContainer\n"); return false; } @@ -364,7 +364,7 @@ HTTPCookieContainerHandle Steam_HTTP::CreateCookieContainer( bool bAllowResponse // Release a cookie container you are finished using, freeing it's memory bool Steam_HTTP::ReleaseCookieContainer( HTTPCookieContainerHandle hCookieContainer ) { - PRINT_DEBUG("ReleaseCookieContainer\n"); + PRINT_DEBUG("Steam_HTTP::ReleaseCookieContainer\n"); return false; } @@ -372,7 +372,7 @@ bool Steam_HTTP::ReleaseCookieContainer( HTTPCookieContainerHandle hCookieContai // Adds a cookie to the specified cookie container that will be used with future requests. bool Steam_HTTP::SetCookie( HTTPCookieContainerHandle hCookieContainer, const char *pchHost, const char *pchUrl, const char *pchCookie ) { - PRINT_DEBUG("SetCookie\n"); + PRINT_DEBUG("Steam_HTTP::SetCookie\n"); return false; } @@ -380,7 +380,7 @@ bool Steam_HTTP::SetCookie( HTTPCookieContainerHandle hCookieContainer, const ch // Set the cookie container to use for a HTTP request bool Steam_HTTP::SetHTTPRequestCookieContainer( HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer ) { - PRINT_DEBUG("SetHTTPRequestCookieContainer\n"); + PRINT_DEBUG("Steam_HTTP::SetHTTPRequestCookieContainer\n"); return false; } @@ -388,7 +388,7 @@ bool Steam_HTTP::SetHTTPRequestCookieContainer( HTTPRequestHandle hRequest, HTTP // Set the extra user agent info for a request, this doesn't clobber the normal user agent, it just adds the extra info on the end bool Steam_HTTP::SetHTTPRequestUserAgentInfo( HTTPRequestHandle hRequest, const char *pchUserAgentInfo ) { - PRINT_DEBUG("SetHTTPRequestUserAgentInfo\n"); + PRINT_DEBUG("Steam_HTTP::SetHTTPRequestUserAgentInfo\n"); Steam_Http_Request *request = get_request(hRequest); if (!request) { return false; @@ -401,7 +401,7 @@ bool Steam_HTTP::SetHTTPRequestUserAgentInfo( HTTPRequestHandle hRequest, const // Set that https request should require verified SSL certificate via machines certificate trust store bool Steam_HTTP::SetHTTPRequestRequiresVerifiedCertificate( HTTPRequestHandle hRequest, bool bRequireVerifiedCertificate ) { - PRINT_DEBUG("SetHTTPRequestRequiresVerifiedCertificate\n"); + PRINT_DEBUG("Steam_HTTP::SetHTTPRequestRequiresVerifiedCertificate\n"); Steam_Http_Request *request = get_request(hRequest); if (!request) { return false; @@ -415,7 +415,7 @@ bool Steam_HTTP::SetHTTPRequestRequiresVerifiedCertificate( HTTPRequestHandle hR // which can bump everytime we get more data bool Steam_HTTP::SetHTTPRequestAbsoluteTimeoutMS( HTTPRequestHandle hRequest, uint32 unMilliseconds ) { - PRINT_DEBUG("SetHTTPRequestAbsoluteTimeoutMS\n"); + PRINT_DEBUG("Steam_HTTP::SetHTTPRequestAbsoluteTimeoutMS\n"); Steam_Http_Request *request = get_request(hRequest); if (!request) { return false; @@ -428,7 +428,7 @@ bool Steam_HTTP::SetHTTPRequestAbsoluteTimeoutMS( HTTPRequestHandle hRequest, ui // Check if the reason the request failed was because we timed it out (rather than some harder failure) bool Steam_HTTP::GetHTTPRequestWasTimedOut( HTTPRequestHandle hRequest, bool *pbWasTimedOut ) { - PRINT_DEBUG("GetHTTPRequestWasTimedOut\n"); + PRINT_DEBUG("Steam_HTTP::GetHTTPRequestWasTimedOut\n"); Steam_Http_Request *request = get_request(hRequest); if (!request) { return false; diff --git a/dll/steam_matchmaking_servers.cpp b/dll/steam_matchmaking_servers.cpp index fc4b1596..29ad2c75 100644 --- a/dll/steam_matchmaking_servers.cpp +++ b/dll/steam_matchmaking_servers.cpp @@ -37,8 +37,11 @@ static int server_list_request; HServerListRequest Steam_Matchmaking_Servers::RequestServerList(AppId_t iApp, ISteamMatchmakingServerListResponse *pRequestServersResponse, EMatchMakingType type) { - PRINT_DEBUG("RequestServerList %u\n", iApp); + PRINT_DEBUG("Steam_Matchmaking_Servers::RequestServerList %u %p, %i\n", iApp, pRequestServersResponse, (int)type); std::lock_guard lock(global_mutex); + ++server_list_request; + HServerListRequest id = (char *)0 + server_list_request; // (char *)0 silences the compiler warning + struct Steam_Matchmaking_Request request; request.appid = iApp; request.callbacks = pRequestServersResponse; @@ -46,11 +49,9 @@ HServerListRequest Steam_Matchmaking_Servers::RequestServerList(AppId_t iApp, IS request.cancelled = false; request.completed = false; request.type = type; + request.id = id; requests.push_back(request); - ++server_list_request; - requests[requests.size() - 1].id = (char *)0 + server_list_request; // (char *)0 silences the compiler warning - HServerListRequest id = requests[requests.size() - 1].id; - PRINT_DEBUG("request id: %p\n", id); + PRINT_DEBUG("Steam_Matchmaking_Servers::request id: %p\n", id); if (type == eLANServer) return id; @@ -68,7 +69,7 @@ HServerListRequest Steam_Matchmaking_Servers::RequestServerList(AppId_t iApp, IS g2.server = server; g2.type = type; gameservers.push_back(g2); - PRINT_DEBUG("SERVER ADDED\n"); + PRINT_DEBUG(" eFriendsServer SERVER ADDED\n"); } } return id; @@ -87,6 +88,7 @@ HServerListRequest Steam_Matchmaking_Servers::RequestServerList(AppId_t iApp, IS file_size = file_size_(file_path); } + PRINT_DEBUG("Steam_Matchmaking_Servers::Server list file '%s' [%llu bytes]\n", file_path.c_str(), file_size); std::string list; if (file_size) { list.resize(file_size); @@ -129,7 +131,7 @@ HServerListRequest Steam_Matchmaking_Servers::RequestServerList(AppId_t iApp, IS g.server = server; g.type = type; gameservers.push_back(g); - PRINT_DEBUG("SERVER ADDED\n"); + PRINT_DEBUG(" SERVER ADDED\n"); list_ip = ""; } @@ -142,43 +144,43 @@ HServerListRequest Steam_Matchmaking_Servers::RequestServerList(AppId_t iApp, IS // Request object must be released by calling ReleaseRequest( hServerListRequest ) HServerListRequest Steam_Matchmaking_Servers::RequestInternetServerList( AppId_t iApp, STEAM_ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) { - PRINT_DEBUG("RequestInternetServerList\n"); + PRINT_DEBUG("Steam_Matchmaking_Servers::RequestInternetServerList\n"); return RequestServerList(iApp, pRequestServersResponse, eInternetServer); } HServerListRequest Steam_Matchmaking_Servers::RequestLANServerList( AppId_t iApp, ISteamMatchmakingServerListResponse *pRequestServersResponse ) { - PRINT_DEBUG("RequestLANServerList\n"); + PRINT_DEBUG("Steam_Matchmaking_Servers::RequestLANServerList\n"); return RequestServerList(iApp, pRequestServersResponse, eLANServer); } HServerListRequest Steam_Matchmaking_Servers::RequestFriendsServerList( AppId_t iApp, STEAM_ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) { - PRINT_DEBUG("RequestFriendsServerList\n"); + PRINT_DEBUG("Steam_Matchmaking_Servers::RequestFriendsServerList\n"); return RequestServerList(iApp, pRequestServersResponse, eFriendsServer); } HServerListRequest Steam_Matchmaking_Servers::RequestFavoritesServerList( AppId_t iApp, STEAM_ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) { - PRINT_DEBUG("RequestFavoritesServerList\n"); + PRINT_DEBUG("Steam_Matchmaking_Servers::RequestFavoritesServerList\n"); return RequestServerList(iApp, pRequestServersResponse, eFavoritesServer); } HServerListRequest Steam_Matchmaking_Servers::RequestHistoryServerList( AppId_t iApp, STEAM_ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) { - PRINT_DEBUG("RequestHistoryServerList\n"); + PRINT_DEBUG("Steam_Matchmaking_Servers::RequestHistoryServerList\n"); return RequestServerList(iApp, pRequestServersResponse, eHistoryServer); } HServerListRequest Steam_Matchmaking_Servers::RequestSpectatorServerList( AppId_t iApp, STEAM_ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) { - PRINT_DEBUG("RequestSpectatorServerList\n"); + PRINT_DEBUG("Steam_Matchmaking_Servers::RequestSpectatorServerList\n"); return RequestServerList(iApp, pRequestServersResponse, eSpectatorServer); } void Steam_Matchmaking_Servers::RequestOldServerList(AppId_t iApp, ISteamMatchmakingServerListResponse001 *pRequestServersResponse, EMatchMakingType type) { - PRINT_DEBUG("RequestOldServerList %u\n", iApp); + PRINT_DEBUG("Steam_Matchmaking_Servers::RequestOldServerList %u\n", iApp); std::lock_guard lock(global_mutex); auto g = std::begin(requests); while (g != std::end(requests)) { @@ -202,42 +204,42 @@ void Steam_Matchmaking_Servers::RequestOldServerList(AppId_t iApp, ISteamMatchma void Steam_Matchmaking_Servers::RequestInternetServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse001 *pRequestServersResponse ) { - PRINT_DEBUG("%s old\n", __FUNCTION__); + PRINT_DEBUG("Steam_Matchmaking_Servers::%s old\n", __FUNCTION__); //TODO RequestOldServerList(iApp, pRequestServersResponse, eInternetServer); } void Steam_Matchmaking_Servers::RequestLANServerList( AppId_t iApp, ISteamMatchmakingServerListResponse001 *pRequestServersResponse ) { - PRINT_DEBUG("%s old\n", __FUNCTION__); + PRINT_DEBUG("Steam_Matchmaking_Servers::%s old\n", __FUNCTION__); //TODO RequestOldServerList(iApp, pRequestServersResponse, eLANServer); } void Steam_Matchmaking_Servers::RequestFriendsServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse001 *pRequestServersResponse ) { - PRINT_DEBUG("%s old\n", __FUNCTION__); + PRINT_DEBUG("Steam_Matchmaking_Servers::%s old\n", __FUNCTION__); //TODO RequestOldServerList(iApp, pRequestServersResponse, eFriendsServer); } void Steam_Matchmaking_Servers::RequestFavoritesServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse001 *pRequestServersResponse ) { - PRINT_DEBUG("%s old\n", __FUNCTION__); + PRINT_DEBUG("Steam_Matchmaking_Servers::%s old\n", __FUNCTION__); //TODO RequestOldServerList(iApp, pRequestServersResponse, eFavoritesServer); } void Steam_Matchmaking_Servers::RequestHistoryServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse001 *pRequestServersResponse ) { - PRINT_DEBUG("%s old\n", __FUNCTION__); + PRINT_DEBUG("Steam_Matchmaking_Servers::%s old\n", __FUNCTION__); //TODO RequestOldServerList(iApp, pRequestServersResponse, eHistoryServer); } void Steam_Matchmaking_Servers::RequestSpectatorServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse001 *pRequestServersResponse ) { - PRINT_DEBUG("%s old\n", __FUNCTION__); + PRINT_DEBUG("Steam_Matchmaking_Servers::%s old\n", __FUNCTION__); //TODO RequestOldServerList(iApp, pRequestServersResponse, eSpectatorServer); } @@ -247,7 +249,7 @@ void Steam_Matchmaking_Servers::RequestSpectatorServerList( AppId_t iApp, MatchM // RefreshComplete callback is not posted when request is released. void Steam_Matchmaking_Servers::ReleaseRequest( HServerListRequest hServerListRequest ) { - PRINT_DEBUG("ReleaseRequest %p\n", hServerListRequest); + PRINT_DEBUG("Steam_Matchmaking_Servers::ReleaseRequest %p\n", hServerListRequest); auto g = std::begin(requests); while (g != std::end(requests)) { if (g->id == hServerListRequest) { @@ -420,7 +422,7 @@ void Steam_Matchmaking_Servers::server_details(Gameserver *g, gameserveritem_t * server->m_nServerVersion = g->version(); server->SetName(g->server_name().c_str()); server->m_steamID = CSteamID((uint64)g->id()); - PRINT_DEBUG("server_details " "%" PRIu64 "\n", g->id()); + PRINT_DEBUG("Steam_Matchmaking_Servers::server_details " "%" PRIu64 "\n", g->id()); strncpy(server->m_szGameTags, g->tags().c_str(), k_cbMaxGameServerTags - 1); server->m_szGameTags[k_cbMaxGameServerTags - 1] = 0; @@ -457,7 +459,7 @@ void Steam_Matchmaking_Servers::server_details_players(Gameserver *g, Steam_Matc if (ssq != NULL) ssq_server_free(ssq); } - PRINT_DEBUG("server_details_players " "%" PRIu64 "\n", g->id()); + PRINT_DEBUG("Steam_Matchmaking_Servers::server_details_players " "%" PRIu64 "\n", g->id()); } void Steam_Matchmaking_Servers::server_details_rules(Gameserver *g, Steam_Matchmaking_Servers_Direct_IP_Request *r) @@ -491,7 +493,7 @@ void Steam_Matchmaking_Servers::server_details_rules(Gameserver *g, Steam_Matchm if (ssq != NULL) ssq_server_free(ssq); } - PRINT_DEBUG("server_details_rules " "%" PRIu64 "\n", g->id()); + PRINT_DEBUG("Steam_Matchmaking_Servers::server_details_rules " "%" PRIu64 "\n", g->id()); } // Get details on a given server in the list, you can get the valid range of index @@ -499,16 +501,16 @@ void Steam_Matchmaking_Servers::server_details_rules(Gameserver *g, Steam_Matchm // ISteamMatchmakingServerListResponse::ServerResponded() callbacks gameserveritem_t *Steam_Matchmaking_Servers::GetServerDetails( HServerListRequest hRequest, int iServer ) { - PRINT_DEBUG("GetServerDetails %p %i\n", hRequest, iServer); + PRINT_DEBUG("Steam_Matchmaking_Servers::GetServerDetails %p %i\n", hRequest, iServer); std::lock_guard lock(global_mutex); std::vector gameservers_filtered; auto g = std::begin(requests); while (g != std::end(requests)) { - PRINT_DEBUG("equal? %p %p\n", hRequest, g->id); + PRINT_DEBUG(" equal? %p %p\n", hRequest, g->id); if (g->id == hRequest) { gameservers_filtered = g->gameservers_filtered; - PRINT_DEBUG("found %zu\n", gameservers_filtered.size()); + PRINT_DEBUG(" found %zu\n", gameservers_filtered.size()); break; } @@ -522,7 +524,7 @@ gameserveritem_t *Steam_Matchmaking_Servers::GetServerDetails( HServerListReques Gameserver *gs = &gameservers_filtered[iServer].server; gameserveritem_t *server = new gameserveritem_t(); //TODO: is the new here ok? server_details(gs, server); - PRINT_DEBUG("Returned server details\n"); + PRINT_DEBUG(" Returned server details\n"); return server; } @@ -535,7 +537,7 @@ gameserveritem_t *Steam_Matchmaking_Servers::GetServerDetails( HServerListReques // The request handle must be released using ReleaseRequest( hRequest ) void Steam_Matchmaking_Servers::CancelQuery( HServerListRequest hRequest ) { - PRINT_DEBUG("CancelQuery %p\n", hRequest); + PRINT_DEBUG("Steam_Matchmaking_Servers::CancelQuery %p\n", hRequest); auto g = std::begin(requests); while (g != std::end(requests)) { if (g->id == hRequest) { @@ -554,14 +556,14 @@ void Steam_Matchmaking_Servers::CancelQuery( HServerListRequest hRequest ) // is released with ReleaseRequest( hRequest ) void Steam_Matchmaking_Servers::RefreshQuery( HServerListRequest hRequest ) { - PRINT_DEBUG("RefreshQuery %p\n", hRequest); + PRINT_DEBUG("Steam_Matchmaking_Servers::RefreshQuery %p\n", hRequest); } // Returns true if the list is currently refreshing its server list bool Steam_Matchmaking_Servers::IsRefreshing( HServerListRequest hRequest ) { - PRINT_DEBUG("IsRefreshing %p\n", hRequest); + PRINT_DEBUG("Steam_Matchmaking_Servers::IsRefreshing %p\n", hRequest); return false; } @@ -569,7 +571,7 @@ bool Steam_Matchmaking_Servers::IsRefreshing( HServerListRequest hRequest ) // How many servers in the given list, GetServerDetails above takes 0... GetServerCount() - 1 int Steam_Matchmaking_Servers::GetServerCount( HServerListRequest hRequest ) { - PRINT_DEBUG("GetServerCount %p\n", hRequest); + PRINT_DEBUG("Steam_Matchmaking_Servers::GetServerCount %p\n", hRequest); std::lock_guard lock(global_mutex); int size = 0; auto g = std::begin(requests); @@ -589,7 +591,7 @@ int Steam_Matchmaking_Servers::GetServerCount( HServerListRequest hRequest ) // Refresh a single server inside of a query (rather than all the servers ) void Steam_Matchmaking_Servers::RefreshServer( HServerListRequest hRequest, int iServer ) { - PRINT_DEBUG("RefreshServer %p\n", hRequest); + PRINT_DEBUG("Steam_Matchmaking_Servers::RefreshServer %p\n", hRequest); //TODO } @@ -608,7 +610,7 @@ static HServerQuery new_server_query() // Request updated ping time and other details from a single server HServerQuery Steam_Matchmaking_Servers::PingServer( uint32 unIP, uint16 usPort, ISteamMatchmakingPingResponse *pRequestServersResponse ) { - PRINT_DEBUG("PingServer %hhu.%hhu.%hhu.%hhu:%hu\n", ((unsigned char *)&unIP)[3], ((unsigned char *)&unIP)[2], ((unsigned char *)&unIP)[1], ((unsigned char *)&unIP)[0], usPort); + PRINT_DEBUG("Steam_Matchmaking_Servers::PingServer %hhu.%hhu.%hhu.%hhu:%hu\n", ((unsigned char *)&unIP)[3], ((unsigned char *)&unIP)[2], ((unsigned char *)&unIP)[1], ((unsigned char *)&unIP)[0], usPort); std::lock_guard lock(global_mutex); Steam_Matchmaking_Servers_Direct_IP_Request r; r.id = new_server_query(); @@ -623,7 +625,7 @@ HServerQuery Steam_Matchmaking_Servers::PingServer( uint32 unIP, uint16 usPort, // Request the list of players currently playing on a server HServerQuery Steam_Matchmaking_Servers::PlayerDetails( uint32 unIP, uint16 usPort, ISteamMatchmakingPlayersResponse *pRequestServersResponse ) { - PRINT_DEBUG("PlayerDetails %hhu.%hhu.%hhu.%hhu:%hu\n", ((unsigned char *)&unIP)[3], ((unsigned char *)&unIP)[2], ((unsigned char *)&unIP)[1], ((unsigned char *)&unIP)[0], usPort); + PRINT_DEBUG("Steam_Matchmaking_Servers::PlayerDetails %hhu.%hhu.%hhu.%hhu:%hu\n", ((unsigned char *)&unIP)[3], ((unsigned char *)&unIP)[2], ((unsigned char *)&unIP)[1], ((unsigned char *)&unIP)[0], usPort); std::lock_guard lock(global_mutex); Steam_Matchmaking_Servers_Direct_IP_Request r; r.id = new_server_query(); @@ -639,7 +641,7 @@ HServerQuery Steam_Matchmaking_Servers::PlayerDetails( uint32 unIP, uint16 usPor // Request the list of rules that the server is running (See ISteamGameServer::SetKeyValue() to set the rules server side) HServerQuery Steam_Matchmaking_Servers::ServerRules( uint32 unIP, uint16 usPort, ISteamMatchmakingRulesResponse *pRequestServersResponse ) { - PRINT_DEBUG("ServerRules %hhu.%hhu.%hhu.%hhu:%hu\n", ((unsigned char *)&unIP)[3], ((unsigned char *)&unIP)[2], ((unsigned char *)&unIP)[1], ((unsigned char *)&unIP)[0], usPort); + PRINT_DEBUG("Steam_Matchmaking_Servers::ServerRules %hhu.%hhu.%hhu.%hhu:%hu\n", ((unsigned char *)&unIP)[3], ((unsigned char *)&unIP)[2], ((unsigned char *)&unIP)[1], ((unsigned char *)&unIP)[0], usPort); std::lock_guard lock(global_mutex); Steam_Matchmaking_Servers_Direct_IP_Request r; r.id = new_server_query(); @@ -657,7 +659,7 @@ HServerQuery Steam_Matchmaking_Servers::ServerRules( uint32 unIP, uint16 usPort, // to one of the above calls to avoid crashing when callbacks occur. void Steam_Matchmaking_Servers::CancelServerQuery( HServerQuery hServerQuery ) { - PRINT_DEBUG("CancelServerQuery\n"); + PRINT_DEBUG("Steam_Matchmaking_Servers::CancelServerQuery\n"); std::lock_guard lock(global_mutex); auto r = std::find_if(direct_ip_requests.begin(), direct_ip_requests.end(), [&hServerQuery](Steam_Matchmaking_Servers_Direct_IP_Request const& item) { return item.id == hServerQuery; }); if (direct_ip_requests.end() == r) return; @@ -673,30 +675,30 @@ void Steam_Matchmaking_Servers::RunCallbacks() while (g != std::end(gameservers)) { if (check_timedout(g->last_recv, SERVER_TIMEOUT)) { g = gameservers.erase(g); - PRINT_DEBUG("SERVER TIMEOUT\n"); + PRINT_DEBUG("Steam_Matchmaking_Servers::SERVER TIMEOUT\n"); } else { ++g; } } } - PRINT_DEBUG("REQUESTS %zu gs: %zu\n", requests.size(), gameservers.size()); + PRINT_DEBUG("Steam_Matchmaking_Servers::REQUESTS %zu gs: %zu\n", requests.size(), gameservers.size()); for (auto &r : requests) { if (r.cancelled || r.completed) continue; r.gameservers_filtered.clear(); for (auto &g : gameservers) { - PRINT_DEBUG("game_server_check %u %u\n", g.server.appid(), r.appid); + PRINT_DEBUG("Steam_Matchmaking_Servers::game_server_check %u %u\n", g.server.appid(), r.appid); if ((g.server.appid() == r.appid) && (g.type == r.type)) { - PRINT_DEBUG("REQUESTS server found\n"); + PRINT_DEBUG("Steam_Matchmaking_Servers::REQUESTS server found\n"); r.gameservers_filtered.push_back(g); } } } std::vector requests_temp(requests); - PRINT_DEBUG("REQUESTS_TEMP %zu\n", requests_temp.size()); + PRINT_DEBUG("Steam_Matchmaking_Servers::REQUESTS_TEMP %zu\n", requests_temp.size()); for (auto &r : requests) { r.completed = true; } @@ -707,7 +709,7 @@ void Steam_Matchmaking_Servers::RunCallbacks() if (r.callbacks) { for (auto &g : r.gameservers_filtered) { - PRINT_DEBUG("REQUESTS server responded cb %p\n", r.id); + PRINT_DEBUG("Steam_Matchmaking_Servers::REQUESTS server responded cb %p\n", r.id); r.callbacks->ServerResponded(r.id, i); ++i; } @@ -721,7 +723,7 @@ void Steam_Matchmaking_Servers::RunCallbacks() if (r.old_callbacks) { for (auto &g : r.gameservers_filtered) { - PRINT_DEBUG("old REQUESTS server responded cb %p\n", r.id); + PRINT_DEBUG("Steam_Matchmaking_Servers::old REQUESTS server responded cb %p\n", r.id); r.old_callbacks->ServerResponded(i); ++i; } @@ -746,9 +748,9 @@ void Steam_Matchmaking_Servers::RunCallbacks() } for (auto &r : direct_ip_requests_temp) { - PRINT_DEBUG("dip request: %u:%hu\n", r.ip, r.port); + PRINT_DEBUG("Steam_Matchmaking_Servers::dip request: %u:%hu\n", r.ip, r.port); for (auto &g : gameservers) { - PRINT_DEBUG("server: %u:%u\n", g.server.ip(), g.server.query_port()); + PRINT_DEBUG("Steam_Matchmaking_Servers::server: %u:%u\n", g.server.ip(), g.server.query_port()); uint16 query_port = g.server.query_port(); if (query_port == 0xFFFF) { query_port = g.server.port(); @@ -785,7 +787,7 @@ void Steam_Matchmaking_Servers::RunCallbacks() void Steam_Matchmaking_Servers::Callback(Common_Message *msg) { if (msg->has_gameserver() && msg->gameserver().type() != eFriendsServer) { - PRINT_DEBUG("got SERVER " "%" PRIu64 ", offline:%u\n", msg->gameserver().id(), msg->gameserver().offline()); + PRINT_DEBUG("Steam_Matchmaking_Servers::got SERVER " "%" PRIu64 ", offline:%u\n", msg->gameserver().id(), msg->gameserver().offline()); if (msg->gameserver().offline()) { for (auto &g : gameservers) { if (g.server.id() == msg->gameserver().id()) { @@ -812,7 +814,7 @@ void Steam_Matchmaking_Servers::Callback(Common_Message *msg) g.server.set_ip(msg->source_ip()); g.type = eLANServer; gameservers.push_back(g); - PRINT_DEBUG("SERVER ADDED\n"); + PRINT_DEBUG("Steam_Matchmaking_Servers::SERVER ADDED\n"); } } } diff --git a/dll/steam_music.cpp b/dll/steam_music.cpp index d30307ff..bc3e126f 100644 --- a/dll/steam_music.cpp +++ b/dll/steam_music.cpp @@ -36,20 +36,20 @@ void Steam_Music::change_playstate(int new_playing) bool Steam_Music::BIsEnabled() { - PRINT_DEBUG("Steam_Music::BIsEnabled\n"); + PRINT_DEBUG("TODO Steam_Music::BIsEnabled\n"); return true; } bool Steam_Music::BIsPlaying() { - PRINT_DEBUG("Steam_Music::BIsPlaying\n"); + PRINT_DEBUG("TODO Steam_Music::BIsPlaying\n"); return playing > 0; } AudioPlayback_Status Steam_Music::GetPlaybackStatus() { - PRINT_DEBUG("Steam_Music::GetPlaybackStatus\n"); + PRINT_DEBUG("TODO Steam_Music::GetPlaybackStatus\n"); if (playing == 0) { return AudioPlayback_Idle; } @@ -67,25 +67,25 @@ AudioPlayback_Status Steam_Music::GetPlaybackStatus() void Steam_Music::Play() { - PRINT_DEBUG("Steam_Music::Play\n"); + PRINT_DEBUG("TODO Steam_Music::Play\n"); change_playstate(2); } void Steam_Music::Pause() { - PRINT_DEBUG("Steam_Music::Pause\n"); + PRINT_DEBUG("TODO Steam_Music::Pause\n"); change_playstate(1); } void Steam_Music::PlayPrevious() { - PRINT_DEBUG("Steam_Music::PlayPrevious\n"); + PRINT_DEBUG("TODO Steam_Music::PlayPrevious\n"); change_playstate(2); } void Steam_Music::PlayNext() { - PRINT_DEBUG("Steam_Music::PlayNext\n"); + PRINT_DEBUG("TODO Steam_Music::PlayNext\n"); change_playstate(2); } @@ -93,7 +93,7 @@ void Steam_Music::PlayNext() // volume is between 0.0 and 1.0 void Steam_Music::SetVolume( float flVolume ) { - PRINT_DEBUG("Steam_Music::SetVolume\n"); + PRINT_DEBUG("TODO Steam_Music::SetVolume\n"); if (flVolume > 1.0) flVolume = 1.0; @@ -111,6 +111,6 @@ void Steam_Music::SetVolume( float flVolume ) float Steam_Music::GetVolume() { - PRINT_DEBUG("Steam_Music::GetVolume\n"); + PRINT_DEBUG("TODO Steam_Music::GetVolume\n"); return volume; } diff --git a/dll/steam_musicremote.cpp b/dll/steam_musicremote.cpp index 958e4461..81e69187 100644 --- a/dll/steam_musicremote.cpp +++ b/dll/steam_musicremote.cpp @@ -20,38 +20,38 @@ // Service Definition bool Steam_MusicRemote::RegisterSteamMusicRemote( const char *pchName ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::DeregisterSteamMusicRemote() { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::BIsCurrentMusicRemote() { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::BActivationSuccess( bool bValue ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::SetDisplayName( const char *pchDisplayName ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::SetPNGIcon_64x64( void *pvBuffer, uint32 cbBufferLength ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } @@ -59,37 +59,37 @@ bool Steam_MusicRemote::SetPNGIcon_64x64( void *pvBuffer, uint32 cbBufferLength // Abilities for the user interface bool Steam_MusicRemote::EnablePlayPrevious(bool bValue) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::EnablePlayNext( bool bValue ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::EnableShuffled( bool bValue ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::EnableLooped( bool bValue ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::EnableQueue( bool bValue ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::EnablePlaylists( bool bValue ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } @@ -97,25 +97,25 @@ bool Steam_MusicRemote::EnablePlaylists( bool bValue ) // Status bool Steam_MusicRemote::UpdatePlaybackStatus( AudioPlayback_Status nStatus ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::UpdateShuffled( bool bValue ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::UpdateLooped( bool bValue ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::UpdateVolume( float flValue ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } // volume is between 0.0 and 1.0 @@ -123,37 +123,37 @@ bool Steam_MusicRemote::UpdateVolume( float flValue ) // Current Entry bool Steam_MusicRemote::CurrentEntryWillChange() { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::CurrentEntryIsAvailable( bool bAvailable ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::UpdateCurrentEntryText( const char *pchText ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::UpdateCurrentEntryElapsedSeconds( int nValue ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::UpdateCurrentEntryCoverArt( void *pvBuffer, uint32 cbBufferLength ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::CurrentEntryDidChange() { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } @@ -161,31 +161,31 @@ bool Steam_MusicRemote::CurrentEntryDidChange() // Queue bool Steam_MusicRemote::QueueWillChange() { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::ResetQueueEntries() { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::SetQueueEntry( int nID, int nPosition, const char *pchEntryText ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::SetCurrentQueueEntry( int nID ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::QueueDidChange() { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } @@ -193,30 +193,30 @@ bool Steam_MusicRemote::QueueDidChange() // Playlist bool Steam_MusicRemote::PlaylistWillChange() { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::ResetPlaylistEntries() { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::SetPlaylistEntry( int nID, int nPosition, const char *pchEntryText ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::SetCurrentPlaylistEntry( int nID ) { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } bool Steam_MusicRemote::PlaylistDidChange() { - PRINT_DEBUG("%s\n", __FUNCTION__); + PRINT_DEBUG("TODO Steam_MusicRemote::%s\n", __FUNCTION__); return false; } diff --git a/dll/steam_parental.cpp b/dll/steam_parental.cpp index 00fd3d21..6fc4205e 100644 --- a/dll/steam_parental.cpp +++ b/dll/steam_parental.cpp @@ -19,38 +19,38 @@ bool Steam_Parental::BIsParentalLockEnabled() { - PRINT_DEBUG("BIsParentalLockEnabled\n"); + PRINT_DEBUG("TODO Steam_Parental::BIsParentalLockEnabled\n"); return false; } bool Steam_Parental::BIsParentalLockLocked() { - PRINT_DEBUG("BIsParentalLockLocked\n"); + PRINT_DEBUG("TODO Steam_Parental::BIsParentalLockLocked\n"); return false; } bool Steam_Parental::BIsAppBlocked( AppId_t nAppID ) { - PRINT_DEBUG("BIsAppBlocked\n"); + PRINT_DEBUG("TODO Steam_Parental::BIsAppBlocked\n"); return false; } bool Steam_Parental::BIsAppInBlockList( AppId_t nAppID ) { - PRINT_DEBUG("BIsAppInBlockList\n"); + PRINT_DEBUG("TODO Steam_Parental::BIsAppInBlockList\n"); return false; } bool Steam_Parental::BIsFeatureBlocked( EParentalFeature eFeature ) { - PRINT_DEBUG("BIsFeatureBlocked\n"); + PRINT_DEBUG("TODO Steam_Parental::BIsFeatureBlocked\n"); return false; } bool Steam_Parental::BIsFeatureInBlockList( EParentalFeature eFeature ) { - PRINT_DEBUG("BIsFeatureInBlockList\n"); + PRINT_DEBUG("TODO Steam_Parental::BIsFeatureInBlockList\n"); return false; } diff --git a/dll/steam_screenshots.cpp b/dll/steam_screenshots.cpp index ce33ba96..3c2131b8 100644 --- a/dll/steam_screenshots.cpp +++ b/dll/steam_screenshots.cpp @@ -33,7 +33,7 @@ ScreenshotHandle Steam_Screenshots::create_screenshot_handle() // The return value is a handle that is valid for the duration of the game process and can be used to apply tags. ScreenshotHandle Steam_Screenshots::WriteScreenshot( void *pubRGB, uint32 cubRGB, int nWidth, int nHeight ) { - PRINT_DEBUG("WriteScreenshot\n"); + PRINT_DEBUG("Steam_Screenshots::WriteScreenshot\n"); char buff[128]; auto now = std::chrono::system_clock::now(); @@ -60,7 +60,7 @@ ScreenshotHandle Steam_Screenshots::WriteScreenshot( void *pubRGB, uint32 cubRGB // JPEG, TGA, and PNG formats are supported. ScreenshotHandle Steam_Screenshots::AddScreenshotToLibrary( const char *pchFilename, const char *pchThumbnailFilename, int nWidth, int nHeight ) { - PRINT_DEBUG("AddScreenshotToLibrary\n"); + PRINT_DEBUG("Steam_Screenshots::AddScreenshotToLibrary\n"); if (pchFilename == nullptr) return INVALID_SCREENSHOT_HANDLE; @@ -91,7 +91,7 @@ ScreenshotHandle Steam_Screenshots::AddScreenshotToLibrary( const char *pchFilen // Causes the Steam overlay to take a screenshot. If screenshots are being hooked by the game then a ScreenshotRequested_t callback is sent back to the game instead. void Steam_Screenshots::TriggerScreenshot() { - PRINT_DEBUG("TriggerScreenshot\n"); + PRINT_DEBUG("Steam_Screenshots::TriggerScreenshot\n"); if (hooked) { @@ -100,7 +100,7 @@ void Steam_Screenshots::TriggerScreenshot() } else { - PRINT_DEBUG("TODO: Make the overlay take a screenshot"); + PRINT_DEBUG(" TODO: Make the overlay take a screenshot"); } } @@ -110,7 +110,7 @@ void Steam_Screenshots::TriggerScreenshot() // in response. void Steam_Screenshots::HookScreenshots( bool bHook ) { - PRINT_DEBUG("HookScreenshots\n"); + PRINT_DEBUG("Steam_Screenshots::HookScreenshots\n"); hooked = bHook; } @@ -118,7 +118,7 @@ void Steam_Screenshots::HookScreenshots( bool bHook ) // Sets metadata about a screenshot's location (for example, the name of the map) bool Steam_Screenshots::SetLocation( ScreenshotHandle hScreenshot, const char *pchLocation ) { - PRINT_DEBUG("SetLocation\n"); + PRINT_DEBUG("Steam_Screenshots::SetLocation\n"); auto it = _screenshots.find(hScreenshot); if (it == _screenshots.end()) @@ -134,7 +134,7 @@ bool Steam_Screenshots::SetLocation( ScreenshotHandle hScreenshot, const char *p // Tags a user as being visible in the screenshot bool Steam_Screenshots::TagUser( ScreenshotHandle hScreenshot, CSteamID steamID ) { - PRINT_DEBUG("TagUser\n"); + PRINT_DEBUG("Steam_Screenshots::TagUser\n"); auto it = _screenshots.find(hScreenshot); if (it == _screenshots.end()) @@ -150,7 +150,7 @@ bool Steam_Screenshots::TagUser( ScreenshotHandle hScreenshot, CSteamID steamID // Tags a published file as being visible in the screenshot bool Steam_Screenshots::TagPublishedFile( ScreenshotHandle hScreenshot, PublishedFileId_t unPublishedFileID ) { - PRINT_DEBUG("TagPublishedFile\n"); + PRINT_DEBUG("Steam_Screenshots::TagPublishedFile\n"); auto it = _screenshots.find(hScreenshot); if (it == _screenshots.end()) @@ -166,7 +166,7 @@ bool Steam_Screenshots::TagPublishedFile( ScreenshotHandle hScreenshot, Publishe // Returns true if the app has hooked the screenshot bool Steam_Screenshots::IsScreenshotsHooked() { - PRINT_DEBUG("IsScreenshotsHooked\n"); + PRINT_DEBUG("Steam_Screenshots::IsScreenshotsHooked\n"); return hooked; } @@ -178,7 +178,7 @@ bool Steam_Screenshots::IsScreenshotsHooked() // JPEG, TGA, and PNG formats are supported. ScreenshotHandle Steam_Screenshots::AddVRScreenshotToLibrary( EVRScreenshotType eType, const char *pchFilename, const char *pchVRFilename ) { - PRINT_DEBUG("AddVRScreenshotToLibrary\n"); + PRINT_DEBUG("Steam_Screenshots::AddVRScreenshotToLibrary\n"); return INVALID_SCREENSHOT_HANDLE; } diff --git a/dll/steam_video.cpp b/dll/steam_video.cpp index 4349281a..32303f46 100644 --- a/dll/steam_video.cpp +++ b/dll/steam_video.cpp @@ -20,14 +20,14 @@ // Get a URL suitable for streaming the given Video app ID's video void Steam_Video::GetVideoURL( AppId_t unVideoAppID ) { - PRINT_DEBUG("GetVideoURL\n"); + PRINT_DEBUG("TODO Steam_Video::GetVideoURL\n"); } // returns true if user is uploading a live broadcast bool Steam_Video::IsBroadcasting( int *pnNumViewers ) { - PRINT_DEBUG("IsBroadcasting\n"); + PRINT_DEBUG("TODO Steam_Video::IsBroadcasting\n"); return false; } @@ -36,11 +36,11 @@ bool Steam_Video::IsBroadcasting( int *pnNumViewers ) STEAM_CALL_BACK( GetOPFSettingsResult_t ) void Steam_Video::GetOPFSettings( AppId_t unVideoAppID ) { - PRINT_DEBUG("GetOPFSettings\n"); + PRINT_DEBUG("TODO Steam_Video::GetOPFSettings\n"); } bool Steam_Video::GetOPFStringForApp( AppId_t unVideoAppID, char *pchBuffer, int32 *pnBufferSize ) { - PRINT_DEBUG("GetOPFStringForApp\n"); + PRINT_DEBUG("TODO Steam_Video::GetOPFStringForApp\n"); return false; }