mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-21 19:45:10 +00:00
Cleanup
This commit is contained in:
parent
de60a0ae44
commit
8928f7d207
2 changed files with 3 additions and 8 deletions
|
@ -29,15 +29,11 @@ void djui_panel_controls_create(struct DjuiBase* caller) {
|
|||
struct DjuiCheckbox* checkboxGB = djui_checkbox_create(&body->base, "Background Gamepad (must restart)", &configBackgroundGamepad);
|
||||
djui_base_set_size_type(&checkboxGB->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
||||
djui_base_set_size(&checkboxGB->base, 1.0f, 32);
|
||||
// djui_interactable_hook_value_change(&checkboxGB->base, djui_panel_display_uncapped_change);
|
||||
|
||||
int numJoys = SDL_NumJoysticks();
|
||||
if (numJoys == 0) { numJoys = 1; }
|
||||
if (numJoys > 100) { numJoys = 100; }
|
||||
if (numJoys > 10) { numJoys = 10; }
|
||||
int strSize = numJoys * 2;
|
||||
if (numJoys > 10) {
|
||||
strSize += (numJoys - 10);
|
||||
}
|
||||
char* gamepadChoices[numJoys];
|
||||
char gamepadChoicesLong[strSize];
|
||||
for (int i = 0; i < numJoys; i++) {
|
||||
|
@ -45,10 +41,9 @@ void djui_panel_controls_create(struct DjuiBase* caller) {
|
|||
if (i > 9) {
|
||||
index += (i - 9);
|
||||
}
|
||||
sprintf(&gamepadChoicesLong[index], "%d\0", i);
|
||||
sprintf(&gamepadChoicesLong[index], "%d", i);
|
||||
gamepadChoices[i] = &gamepadChoicesLong[index];
|
||||
}
|
||||
// char* gamepadChoices[16] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15"};
|
||||
struct DjuiSelectionbox* selectionboxGamepad = djui_selectionbox_create(&body->base, "Gamepad", gamepadChoices, numJoys, &configGamepadNumber);
|
||||
djui_base_set_size_type(&selectionboxGamepad->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
||||
djui_base_set_size(&selectionboxGamepad->base, 1.0f, 32);
|
||||
|
|
|
@ -23,7 +23,7 @@ static void playerlist_update_row(u8 i, struct NetworkPlayer *np) {
|
|||
if (np->currActNum != 99 && np->currActNum != 0) {
|
||||
snprintf(sActNum, 7, "# %d", np->currActNum);
|
||||
} else if (np->currActNum == 0) {
|
||||
snprintf(sActNum, 7, "");
|
||||
snprintf(sActNum, 7, " ");
|
||||
} else {
|
||||
snprintf(sActNum, 7, "Done");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue