Skip to content

Commit

Permalink
keep FOV search radius in hiDPI screen consistent from user perspective
Browse files Browse the repository at this point in the history
  • Loading branch information
henrysky committed Nov 23, 2024
1 parent b2507ce commit 0c8db18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/StelObjectMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,8 @@ StelObjectP StelObjectMgr::cleverFind(const StelCore* core, const Vec3d& v) cons
{
const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);

// Field of view for a searchRadiusPixel pixel diameter circle on screen
const double fov_around = core->getMovementMgr()->getCurrentFov()/qMin(prj->getViewportWidth(), prj->getViewportHeight()) * searchRadiusPixel;
// Field of view for a searchRadiusPixel pixel diameter circle on User's screen (which may not be the same on scaled display)
const double fov_around = core->getMovementMgr()->getCurrentFov()/qMin(prj->getViewportWidth(), prj->getViewportHeight()) * searchRadiusPixel * core->getCurrentStelProjectorParams().devicePixelsPerPixel;

// Collect the objects inside the range
// TODO: normalize v here, and just Q_ASSERT normalized state in the submodules' searchAround() calls.
Expand Down

0 comments on commit 0c8db18

Please sign in to comment.