Skip to content

Commit

Permalink
Cursor::SetPos() がシーンサイズを考慮していない問題を修正 (#1168)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashi0034 authored Dec 27, 2023
1 parent e6c6d66 commit 2b594cd
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,9 @@ namespace s3d

void CCursor::setPos(const Point pos)
{
const double scaling = SIV3D_ENGINE(Window)->getState().scaling;
POINT point{ static_cast<int32>(pos.x * scaling), static_cast<int32>(pos.y * scaling) };
const Vec2 rawPos = m_transformAll.transformPoint(pos);

POINT point{ static_cast<int32>(rawPos.x), static_cast<int32>(rawPos.y) };
::ClientToScreen(m_hWnd, &point);
::SetCursorPos(point.x, point.y);

Expand Down

0 comments on commit 2b594cd

Please sign in to comment.