mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 03:55:11 +00:00
DJUI interactable crash fix
This commit is contained in:
parent
b015468728
commit
78d287406d
1 changed files with 8 additions and 6 deletions
|
@ -406,14 +406,16 @@ void djui_interactable_update(void) {
|
|||
u16 mainButtons = PAD_BUTTON_A | PAD_BUTTON_B;
|
||||
if ((mouseButtons & MOUSE_BUTTON_1) && !(sLastMouseButtons && MOUSE_BUTTON_1) && !djui_cursor_inside_base(gInteractableFocus)) {
|
||||
// clicked outside of focused
|
||||
if (!gDjuiChatBoxFocus && gInteractableFocus != &gDjuiChatBox->chatInput->base) {
|
||||
djui_interactable_set_input_focus(NULL);
|
||||
}
|
||||
// if (!gDjuiChatBoxFocus && gDjuiChatBox != NULL && gInteractableFocus != &gDjuiChatBox->chatInput->base) {
|
||||
// djui_interactable_set_input_focus(NULL);
|
||||
// }
|
||||
djui_interactable_set_input_focus(NULL);
|
||||
} else if ((padButtons & mainButtons) && !(sLastInteractablePad.button & mainButtons)) {
|
||||
// pressed main face button
|
||||
if (!gDjuiChatBoxFocus && gInteractableFocus != &gDjuiChatBox->chatInput->base) {
|
||||
djui_interactable_set_input_focus(NULL);
|
||||
}
|
||||
// if (!gDjuiChatBoxFocus && gDjuiChatBox != NULL && gInteractableFocus != &gDjuiChatBox->chatInput->base) {
|
||||
// djui_interactable_set_input_focus(NULL);
|
||||
// }
|
||||
djui_interactable_set_input_focus(NULL);
|
||||
} else {
|
||||
djui_interactable_on_focus(gInteractableFocus);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue