Skip to content

Commit

Permalink
Merge branch 'mikke89:master' into macos
Browse files Browse the repository at this point in the history
  • Loading branch information
NaLiJa authored Oct 18, 2023
2 parents 8890253 + 61606db commit 15e96b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Backends/RmlUi_Platform_GLFW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ bool RmlGLFW::ProcessCursorPosCallback(Rml::Context* context, GLFWwindow* window
glfwGetFramebufferSize(window, &framebuffer_size.x, &framebuffer_size.y);

// Convert from mouse position in GLFW screen coordinates to framebuffer coordinates (pixels) used by RmlUi.
const Vector2d mouse_pos = Vector2d(xpos, ypos) * (Vector2d(window_size) / Vector2d(framebuffer_size));
const Vector2d mouse_pos = Vector2d(xpos, ypos) * (Vector2d(framebuffer_size) / Vector2d(window_size));
const Vector2i mouse_pos_round = {int(Rml::Math::Round(mouse_pos.x)), int(Rml::Math::Round(mouse_pos.y))};

bool result = context->ProcessMouseMove(mouse_pos_round.x, mouse_pos_round.y, RmlGLFW::ConvertKeyModifiers(mods));
Expand Down

0 comments on commit 15e96b2

Please sign in to comment.