2
0
mirror of https://github.com/Genymobile/scrcpy synced 2025-08-31 14:25:56 +00:00

Move newline generation in help

If we removed the shortcuts intro, we would not need the additional '\n'
of the section title, so it should be printed along with the shortcuts
intro.
This commit is contained in:
Romain Vimont
2021-12-09 21:43:54 +01:00
parent 3ada5c51bc
commit b5d4ec61fc

View File

@@ -776,7 +776,7 @@ print_shortcuts_intro(unsigned cols) {
return; return;
} }
printf("%s\n", intro); printf("\n%s\n", intro);
free(intro); free(intro);
} }
@@ -831,7 +831,7 @@ scrcpy_print_usage(const char *arg0) {
} }
// Print shortcuts section // Print shortcuts section
printf("\nShortcuts:\n\n"); printf("\nShortcuts:\n");
print_shortcuts_intro(cols); print_shortcuts_intro(cols);
for (size_t i = 0; i < ARRAY_LEN(shortcuts); ++i) { for (size_t i = 0; i < ARRAY_LEN(shortcuts); ++i) {
print_shortcut(&shortcuts[i], cols); print_shortcut(&shortcuts[i], cols);