Skip to content

Commit

Permalink
fix compile android
Browse files Browse the repository at this point in the history
  • Loading branch information
gameknife committed Dec 28, 2024
1 parent f640ae5 commit 1f83227
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/Application/gkNextRenderer/gkNextRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ bool NextRendererGameInstance::OnCursorPosition(double xpos, double ypos)
bool NextRendererGameInstance::OnMouseButton(int button, int action, int mods)
{
modelViewController_.OnMouseButton( button, action, mods);


#if !ANDROID
if (button == GLFW_MOUSE_BUTTON_LEFT && action == GLFW_PRESS)
{
auto mousePos = GetEngine().GetMousePos();
Expand All @@ -87,6 +88,8 @@ bool NextRendererGameInstance::OnMouseButton(int button, int action, int mods)
});
return true;
}
#endif

return true;
}

Expand Down
4 changes: 3 additions & 1 deletion src/Runtime/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,10 @@ void NextEngine::DrawAuxPoint(glm::vec3 location, glm::vec4 color, float size, i

glm::dvec2 NextEngine::GetMousePos()
{
double x,y;
double x{},y{};
#if !ANDROID
glfwGetCursorPos( window_->Handle(), &x, &y );
#endif
return glm::dvec2(x,y);
}

Expand Down

0 comments on commit 1f83227

Please sign in to comment.