Skip to content

Commit 493915c

Browse files
committed
Debug code cleaned up.
1 parent ea0edb8 commit 493915c

1 file changed

Lines changed: 0 additions & 56 deletions

File tree

source/tracker.cpp

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -6152,24 +6152,6 @@ static void render_trackable_category_section(Tracker *t, const AppSettings *set
61526152
bool view_editable_self = tracker_view_editable_by_self(t, settings);
61536153
bool rcv_host_only_stat = (settings->network_mode == NETWORK_RECEIVER &&
61546154
settings->coop_stat_checkbox == COOP_STAT_CHECKBOX_HOST_ONLY);
6155-
if (is_hovered) {
6156-
static Uint32 s_last_log_stat_sub = 0;
6157-
Uint32 now_sub = SDL_GetTicks();
6158-
if (now_sub - s_last_log_stat_sub > 1000) {
6159-
s_last_log_stat_sub = now_sub;
6160-
CoopNetState st_sub = g_coop_ctx ? coop_net_get_state(g_coop_ctx) : COOP_NET_IDLE;
6161-
const char *view_uuid_sub = tracker_current_view_uuid(t, settings);
6162-
log_message(LOG_ERROR,
6163-
"[TOOLTIP-DEBUG STAT-SUB] crit=%s net_mode=%d coop_state=%d "
6164-
"stat_checkbox=%d view_editable_self=%d rcv_host_only=%d "
6165-
"view_uuid=%s local_uuid=%s\n",
6166-
crit->root_name, (int) settings->network_mode, (int) st_sub,
6167-
(int) settings->coop_stat_checkbox,
6168-
(int) view_editable_self, (int) rcv_host_only_stat,
6169-
view_uuid_sub ? view_uuid_sub : "(null/All Players)",
6170-
settings->local_player.uuid);
6171-
}
6172-
}
61736155
// Co-op: Show tooltip for host-only stat checkboxes and/or cross-player view
61746156
if (is_hovered && (rcv_host_only_stat || !view_editable_self)) {
61756157
char tooltip_buf[224];
@@ -6454,24 +6436,6 @@ static void render_trackable_category_section(Tracker *t, const AppSettings *set
64546436
bool view_editable_self_p = tracker_view_editable_by_self(t, settings);
64556437
bool rcv_host_only_stat_p = (settings->network_mode == NETWORK_RECEIVER &&
64566438
settings->coop_stat_checkbox == COOP_STAT_CHECKBOX_HOST_ONLY);
6457-
if (is_hovered_parent) {
6458-
static Uint32 s_last_log_stat_par = 0;
6459-
Uint32 now_par = SDL_GetTicks();
6460-
if (now_par - s_last_log_stat_par > 1000) {
6461-
s_last_log_stat_par = now_par;
6462-
CoopNetState st_par = g_coop_ctx ? coop_net_get_state(g_coop_ctx) : COOP_NET_IDLE;
6463-
const char *view_uuid_par = tracker_current_view_uuid(t, settings);
6464-
log_message(LOG_ERROR,
6465-
"[TOOLTIP-DEBUG STAT-PARENT] cat=%s net_mode=%d coop_state=%d "
6466-
"stat_checkbox=%d view_editable_self=%d rcv_host_only=%d "
6467-
"view_uuid=%s local_uuid=%s\n",
6468-
cat->root_name, (int) settings->network_mode, (int) st_par,
6469-
(int) settings->coop_stat_checkbox,
6470-
(int) view_editable_self_p, (int) rcv_host_only_stat_p,
6471-
view_uuid_par ? view_uuid_par : "(null/All Players)",
6472-
settings->local_player.uuid);
6473-
}
6474-
}
64756439
// Co-op: Show tooltip for host-only stat checkboxes and/or cross-player view
64766440
if (is_hovered_parent && (rcv_host_only_stat_p || !view_editable_self_p)) {
64776441
char tooltip_buf[224];
@@ -7508,26 +7472,6 @@ static void render_custom_goals_section(Tracker *t, const AppSettings *settings,
75087472
bool view_editable_self_cg = tracker_view_editable_by_self(t, settings);
75097473
bool rcv_host_only_cg = (settings->network_mode == NETWORK_RECEIVER &&
75107474
settings->coop_custom_goal_mode == COOP_CUSTOM_HOST_ONLY);
7511-
if (is_hovered) {
7512-
// DEBUG: throttled log of co-op tooltip state so we can diagnose why
7513-
// the Host Only tooltip doesn't fire on receivers in All Players view.
7514-
static Uint32 s_last_log_cg = 0;
7515-
Uint32 now_cg = SDL_GetTicks();
7516-
if (now_cg - s_last_log_cg > 1000) {
7517-
s_last_log_cg = now_cg;
7518-
CoopNetState st_cg = g_coop_ctx ? coop_net_get_state(g_coop_ctx) : COOP_NET_IDLE;
7519-
const char *view_uuid_cg = tracker_current_view_uuid(t, settings);
7520-
log_message(LOG_ERROR,
7521-
"[TOOLTIP-DEBUG CG] item=%s net_mode=%d coop_state=%d "
7522-
"custom_goal_mode=%d rcv_in_lobby=%d view_editable_self=%d "
7523-
"rcv_host_only=%d view_uuid=%s local_uuid=%s\n",
7524-
item->root_name, (int) settings->network_mode, (int) st_cg,
7525-
(int) settings->coop_custom_goal_mode, (int) rcv_in_lobby,
7526-
(int) view_editable_self_cg, (int) rcv_host_only_cg,
7527-
view_uuid_cg ? view_uuid_cg : "(null/All Players)",
7528-
settings->local_player.uuid);
7529-
}
7530-
}
75317475
if (is_hovered && (rcv_host_only_cg || !view_editable_self_cg)) {
75327476
char tooltip_buf[224];
75337477
if (rcv_host_only_cg && !view_editable_self_cg) {

0 commit comments

Comments
 (0)