From 0617923ae7f450ece7288f8a73446c45a8ed32db Mon Sep 17 00:00:00 2001 From: leviathan Date: Tue, 3 Sep 2024 15:38:35 -0700 Subject: remove crashy LLSD ctor used by GameControl --- indra/newview/llappviewer.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 475610be36..75cd189980 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1531,7 +1531,7 @@ bool LLAppViewer::doFrame() LL_WARNS() << " Someone took over my signal/exception handler (post messagehandling)!" << LL_ENDL; } - gViewerWindow->getWindow()->gatherInput(); + gViewerWindow->getWindow()->gatherInput(gFocusMgr.getAppHasFocus()); } //memory leaking simulation @@ -4811,11 +4811,6 @@ void LLAppViewer::idle() gAgent.autoPilot(&yaw); } - // Some GameControl logic needs to run even when the feature is not enabled - // Note: we process game_control before sending AgentUpdate - // because it may translate to control flags that control avatar motion. - LLGameControl::processEvents(gFocusMgr.getAppHasFocus()); - // get control flags from each side U32 control_flags = gAgent.getControlFlags(); U32 game_control_action_flags = LLGameControl::computeInternalActionFlags(); @@ -4841,6 +4836,12 @@ void LLAppViewer::idle() } send_agent_update(false); + + // After calling send_agent_update() in the mainloop we always clear + // the agent's ephemeral ControlFlags (whether an AgentUpdate was + // actually sent or not) because these will be recomputed based on + // real-time key/controller input and resubmitted next frame. + gAgent.resetControlFlags(); } ////////////////////////////////////// -- cgit v1.2.3