Skip to content

Commit

Permalink
Fixes #3216 - Airplane dashboard not reacting to mouse
Browse files Browse the repository at this point in the history
_problem: _
wrong viewport dimensions used when calculating relative mouse position to query for overlay element.
Broken in #3184. Before that, we queried both mouse position and viewport dimensions directly from OIS.
I had to change that because of OIS bug, and now the dimension values are not updated correctly.

_solution:_
Minimum viable fix - just keep the same dummy OIS event, just update the viewport dimensions.
  • Loading branch information
ohlidalp committed Jan 30, 2025
1 parent bbffeda commit 5bded0d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/main/utils/InputEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,10 @@ OIS::MouseState InputEngine::getMouseState()
// See commentary in `resetKeysAndMouseButtons()`
// To work around, we keep internal button states and pay attention not to get them polluted by OIS.
// -----------------------------------------------------------------------------------------------------

mouseState.width = (int)App::GetAppContext()->GetRenderWindow()->getWidth();
mouseState.height = (int)App::GetAppContext()->GetRenderWindow()->getHeight();

return mouseState;
}

Expand Down

0 comments on commit 5bded0d

Please sign in to comment.