Skip to content

Commit

Permalink
Samples: correctly disconnect input on paused events
Browse files Browse the repository at this point in the history
  • Loading branch information
paroj committed May 9, 2024
1 parent 6930e57 commit f122cb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Samples/Common/include/SdkSample.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ namespace OgreBites
mDragLook = false;
}

void paused() override { mContext->removeInputListener(this); }
void paused() override { mContext->removeInputListener(&mInputListenerChain); }

/*-----------------------------------------------------------------------------
| Manually update the cursor position after being unpaused.
-----------------------------------------------------------------------------*/
void unpaused() override
{
mContext->addInputListener(this);
mContext->addInputListener(&mInputListenerChain);
mTrayMgr->refreshCursor();
}

Expand Down

0 comments on commit f122cb2

Please sign in to comment.