mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
fix djui back button bug and crash [build]
could be caused by pressing B and letting go of A on the same frame
This commit is contained in:
parent
b8fe342c17
commit
65b67ad9fa
4 changed files with 8 additions and 4 deletions
|
|
@ -438,6 +438,7 @@ void djui_interactable_update(void) {
|
|||
} else if ((padButtons & PAD_BUTTON_B) && !(sLastInteractablePad.button & PAD_BUTTON_B)) {
|
||||
// pressed back button on controller
|
||||
djui_panel_back();
|
||||
return;
|
||||
} else if ((padButtons & PAD_BUTTON_START) && !(sLastInteractablePad.button & PAD_BUTTON_START)) {
|
||||
// pressed start button
|
||||
if (gDjuiPanelPauseCreated) { djui_panel_shutdown(); }
|
||||
|
|
|
|||
|
|
@ -75,5 +75,6 @@ void djui_panel_dynos_create(struct DjuiBase* caller) {
|
|||
}
|
||||
|
||||
struct DjuiPanel* p = djui_panel_add(caller, panel, NULL);
|
||||
if (!p) { return; }
|
||||
p->on_panel_destroy = djui_panel_dynos_destroy;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ static void select_language(struct DjuiBase* caller) {
|
|||
tmp->base.interactable->update_style(&tmp->base);
|
||||
child = child->next;
|
||||
}
|
||||
|
||||
|
||||
char* langName = checkbox->text->message;
|
||||
char* key = djui_language_find_key("LANGUAGE",langName);
|
||||
if (key) langName = key;
|
||||
|
|
@ -137,9 +137,9 @@ void djui_panel_language_create(struct DjuiBase* caller) {
|
|||
|
||||
bool match = !strcmp(path, configLanguage);
|
||||
if (match) { foundMatch = true; }
|
||||
|
||||
|
||||
struct DjuiCheckbox* checkbox = NULL;
|
||||
|
||||
|
||||
char* displayName = djui_language_get("LANGUAGE",path);
|
||||
if (displayName != (char*)path) {
|
||||
char newName[SYS_MAX_PATH + 32] = { 0 };
|
||||
|
|
@ -149,7 +149,7 @@ void djui_panel_language_create(struct DjuiBase* caller) {
|
|||
else {
|
||||
checkbox = djui_checkbox_create(sLayoutBase, path, match ? &sTrue : &sFalse, select_language);
|
||||
}
|
||||
|
||||
|
||||
if (!strcmp(path, "English")) { chkEnglish = checkbox; }
|
||||
}
|
||||
|
||||
|
|
@ -168,6 +168,7 @@ skip_langs:
|
|||
}
|
||||
|
||||
struct DjuiPanel* p = djui_panel_add(caller, panel, NULL);
|
||||
if (!p) { return; }
|
||||
p->on_panel_destroy = djui_panel_language_destroy;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -475,5 +475,6 @@ void djui_panel_player_create(struct DjuiBase* caller) {
|
|||
}
|
||||
|
||||
struct DjuiPanel* p = djui_panel_add(caller, panel, NULL);
|
||||
if (!p) { return; }
|
||||
p->on_panel_destroy = djui_panel_player_destroy;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue