Skip to content

Commit

Permalink
fix action.screen_y to make sure it starts from 0 instead of 1 (def…
Browse files Browse the repository at this point in the history
  • Loading branch information
AGulev authored and ultimanidev committed Nov 8, 2023
1 parent 3087d6f commit 9638592
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions engine/engine/src/engine.cpp
Expand Up @@ -1346,6 +1346,7 @@ namespace dmEngine
{
Engine* engine = (Engine*)user_data;
int32_t window_height = dmGraphics::GetWindowHeight(engine->m_GraphicsContext);
window_height -= 1; // mouse position uses [0; size - 1] instead of [1, size]
dmArray<dmGameObject::InputAction>* input_buffer = &engine->m_InputBuffer;
dmGameObject::InputAction input_action;
input_action.m_ActionId = action_id;
Expand Down

0 comments on commit 9638592

Please sign in to comment.