mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-11-27 05:04:01 +08:00
fix this debug message in steam_networking
This commit is contained in:
parent
2363f35a93
commit
46424f43bc
@ -233,12 +233,12 @@ static inline void thisThreadYieldFor(std::chrono::microseconds u)
|
|||||||
PRINT_DEBUG("Thread finished waiting\n");
|
PRINT_DEBUG("Thread finished waiting\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string uint8_vector_to_hex_string(std::vector<uint8_t>& v)
|
static std::string uint8_vector_to_hex_string(const std::vector<uint8_t>& v)
|
||||||
{
|
{
|
||||||
std::string result;
|
std::string result{};
|
||||||
result.reserve(v.size() * 2); // two digits per character
|
result.reserve(v.size() * 2); // two digits per character
|
||||||
|
|
||||||
static constexpr char hex[] = "0123456789ABCDEF";
|
static constexpr const char hex[] = "0123456789ABCDEF";
|
||||||
|
|
||||||
for (uint8_t c : v)
|
for (uint8_t c : v)
|
||||||
{
|
{
|
||||||
|
@ -907,10 +907,11 @@ void Callback(Common_Message *msg)
|
|||||||
{
|
{
|
||||||
if (msg->has_network()) {
|
if (msg->has_network()) {
|
||||||
#ifndef EMU_RELEASE_BUILD
|
#ifndef EMU_RELEASE_BUILD
|
||||||
PRINT_DEBUG("Steam_Networking: got msg from: " "%" PRIu64 " to: " "%" PRIu64 " size %zu type %u | messages %p: %zu\n", msg->source_id(), msg->dest_id(), msg->network().data().size(), msg->network().type(), &messages, messages.size());
|
PRINT_DEBUG(
|
||||||
for (int i = 0; i < msg->network().data().size(); ++i) {
|
"Steam_Networking: got msg from: " "%" PRIu64 " to: " "%" PRIu64 " size %zu type %u | messages %p: %zu\n",
|
||||||
PRINT_DEBUG("%02hhX", msg->network().data().data()[i]);
|
msg->source_id(), msg->dest_id(), msg->network().data().size(), msg->network().type(), &messages, messages.size()
|
||||||
}PRINT_DEBUG("\n");
|
);
|
||||||
|
PRINT_DEBUG("Steam_Networking msg data: '%s'\n", uint8_vector_to_hex_string( std::vector<uint8_t>(msg->network().data().begin(), msg->network().data().end()) ).c_str());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (msg->network().type() == Network_pb::DATA) {
|
if (msg->network().type() == Network_pb::DATA) {
|
||||||
|
@ -535,7 +535,7 @@ void Steam_Matchmaking_Servers::server_details_rules(Gameserver *g, Steam_Matchm
|
|||||||
PRINT_DEBUG(" Steam_Matchmaking_Servers::server_details_rules rules: %i\n", number_rules);
|
PRINT_DEBUG(" Steam_Matchmaking_Servers::server_details_rules rules: %i\n", number_rules);
|
||||||
auto rule = g->values().begin();
|
auto rule = g->values().begin();
|
||||||
for (int i = 0; i < number_rules; ++i) {
|
for (int i = 0; i < number_rules; ++i) {
|
||||||
PRINT_DEBUG(" Steam_Matchmaking_Servers::server_details_rules RULE '%s' '%s'\n", rule->first.c_str(), rule->second.c_str());
|
PRINT_DEBUG(" Steam_Matchmaking_Servers::server_details_rules RULE '%s'='%s'\n", rule->first.c_str(), rule->second.c_str());
|
||||||
r->rules_response->RulesResponded(rule->first.c_str(), rule->second.c_str());
|
r->rules_response->RulesResponded(rule->first.c_str(), rule->second.c_str());
|
||||||
++rule;
|
++rule;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user