mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-01-22 23:52:15 -05: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;
|
u16 mainButtons = PAD_BUTTON_A | PAD_BUTTON_B;
|
||||||
if ((mouseButtons & MOUSE_BUTTON_1) && !(sLastMouseButtons && MOUSE_BUTTON_1) && !djui_cursor_inside_base(gInteractableFocus)) {
|
if ((mouseButtons & MOUSE_BUTTON_1) && !(sLastMouseButtons && MOUSE_BUTTON_1) && !djui_cursor_inside_base(gInteractableFocus)) {
|
||||||
// clicked outside of focused
|
// clicked outside of focused
|
||||||
if (!gDjuiChatBoxFocus && gInteractableFocus != &gDjuiChatBox->chatInput->base) {
|
// if (!gDjuiChatBoxFocus && gDjuiChatBox != NULL && gInteractableFocus != &gDjuiChatBox->chatInput->base) {
|
||||||
|
// djui_interactable_set_input_focus(NULL);
|
||||||
|
// }
|
||||||
djui_interactable_set_input_focus(NULL);
|
djui_interactable_set_input_focus(NULL);
|
||||||
}
|
|
||||||
} else if ((padButtons & mainButtons) && !(sLastInteractablePad.button & mainButtons)) {
|
} else if ((padButtons & mainButtons) && !(sLastInteractablePad.button & mainButtons)) {
|
||||||
// pressed main face button
|
// pressed main face button
|
||||||
if (!gDjuiChatBoxFocus && gInteractableFocus != &gDjuiChatBox->chatInput->base) {
|
// if (!gDjuiChatBoxFocus && gDjuiChatBox != NULL && gInteractableFocus != &gDjuiChatBox->chatInput->base) {
|
||||||
|
// djui_interactable_set_input_focus(NULL);
|
||||||
|
// }
|
||||||
djui_interactable_set_input_focus(NULL);
|
djui_interactable_set_input_focus(NULL);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
djui_interactable_on_focus(gInteractableFocus);
|
djui_interactable_on_focus(gInteractableFocus);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue