Skip to content

Commit 5863bb0

Browse files
committed
Subsystem environ logging cleanup
1 parent d90ff21 commit 5863bb0

1 file changed

Lines changed: 15 additions & 38 deletions

File tree

runloop.c

Lines changed: 15 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -424,27 +424,26 @@ static bool runloop_environ_cb_get_system_info(unsigned cmd, void *data)
424424
if (!do_debug_log)
425425
continue;
426426

427-
RARCH_DBG("Subsystem ID: %d\nSpecial game type: %s\n Ident: %s\n ID: %u\n Content:\n",
428-
i,
427+
RARCH_DBG("Subsystem #%u \"%s\", Ident: \"%s\".\n",
428+
info[i].id,
429429
info[i].desc,
430-
info[i].ident,
431-
info[i].id
432-
);
430+
info[i].ident);
431+
433432
for (j = 0; j < info[i].num_roms; j++)
434433
{
435-
RARCH_DBG(" %s (%s)\n",
436-
info[i].roms[j].desc, info[i].roms[j].required ?
437-
"required" : "optional");
434+
RARCH_DBG(" \"%s\" (%s)\n",
435+
info[i].roms[j].desc,
436+
info[i].roms[j].required ? "required" : "optional");
438437
}
439438
}
440439

441440
size = i;
442441

443442
if (do_debug_log)
444443
{
445-
RARCH_DBG("Subsystems: %d\n", i);
444+
RARCH_DBG("Subsystems: %u.\n", size);
446445
if (size > SUBSYSTEM_MAX_SUBSYSTEMS)
447-
RARCH_WARN("Subsystems exceed subsystem max, clamping to %d\n", SUBSYSTEM_MAX_SUBSYSTEMS);
446+
RARCH_WARN("Subsystems exceed subsystem max, clamping to %d.\n", SUBSYSTEM_MAX_SUBSYSTEMS);
448447
}
449448

450449
if (sys_info)
@@ -2113,7 +2112,7 @@ bool runloop_environment_cb(unsigned cmd, void *data)
21132112
{
21142113
unsigned mapped_port = settings->uints.input_remap_ports[p];
21152114

2116-
RARCH_DBG(" %s %u:\n", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PORT), p + 1);
2115+
RARCH_DBG("%s %u:\n", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PORT), p + 1);
21172116

21182117
for (retro_id = 0; retro_id < RARCH_FIRST_CUSTOM_BIND; retro_id++)
21192118
{
@@ -2125,7 +2124,7 @@ bool runloop_environment_cb(unsigned cmd, void *data)
21252124
continue;
21262125

21272126
_enum = (enum msg_hash_enums)(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B + bind_index);
2128-
RARCH_DBG(" \"%s\" => \"%s\"\n",
2127+
RARCH_DBG(" \"%s\" => \"%s\"\n",
21292128
msg_hash_to_str(_enum), description);
21302129
}
21312130

@@ -2140,7 +2139,7 @@ bool runloop_environment_cb(unsigned cmd, void *data)
21402139

21412140
_enum = (enum msg_hash_enums)(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_PLUS
21422141
+ bind_index - RARCH_FIRST_CUSTOM_BIND);
2143-
RARCH_DBG(" \"%s\" => \"%s\"\n",
2142+
RARCH_DBG(" \"%s\" => \"%s\"\n",
21442143
msg_hash_to_str(_enum), description);
21452144
}
21462145
}
@@ -2735,30 +2734,8 @@ bool runloop_environment_cb(unsigned cmd, void *data)
27352734
size_t i;
27362735
const struct retro_subsystem_info *info =
27372736
(const struct retro_subsystem_info*)data;
2738-
unsigned log_level = settings->uints.libretro_log_level;
2739-
2740-
RARCH_LOG("[Environ] SET_SUBSYSTEM_INFO.\n");
2741-
2742-
for (i = 0; info[i].ident; i++)
2743-
{
2744-
unsigned j;
27452737

2746-
if (log_level != RETRO_LOG_DEBUG)
2747-
continue;
2748-
2749-
RARCH_DBG("Special game type: %s\n Ident: %s\n ID: %u\n Content:\n",
2750-
info[i].desc,
2751-
info[i].ident,
2752-
info[i].id
2753-
);
2754-
2755-
for (j = 0; j < info[i].num_roms; j++)
2756-
{
2757-
RARCH_DBG(" %s (%s)\n",
2758-
info[i].roms[j].desc, info[i].roms[j].required ?
2759-
"required" : "optional");
2760-
}
2761-
}
2738+
for (i = 0; info[i].ident; i++) {}
27622739

27632740
if (sys_info)
27642741
{
@@ -2798,11 +2775,11 @@ bool runloop_environment_cb(unsigned cmd, void *data)
27982775
if (log_level != RETRO_LOG_DEBUG)
27992776
continue;
28002777

2801-
RARCH_DBG(" %s %u:\n", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PORT), i + 1);
2778+
RARCH_DBG("%s %u:\n", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PORT), i + 1);
28022779

28032780
for (j = 0; j < info[i].num_types; j++)
28042781
if (info[i].types[j].desc)
2805-
RARCH_DBG(" \"%s\" (%u)\n",
2782+
RARCH_DBG(" \"%s\" (%u)\n",
28062783
info[i].types[j].desc,
28072784
info[i].types[j].id);
28082785
}

0 commit comments

Comments
 (0)