MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / ContextGetCursorPositionScaled

Function ContextGetCursorPositionScaled

src/openrct2/Context.cpp:1600–1606  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1598 }
1599
1600 ScreenCoordsXY ContextGetCursorPositionScaled()
1601 {
1602 auto cursorCoords = ContextGetCursorPosition();
1603 // Compensate for window scaling.
1604 return { static_cast<int32_t>(std::ceil(cursorCoords.x / Config::Get().general.windowScale)),
1605 static_cast<int32_t>(std::ceil(cursorCoords.y / Config::Get().general.windowScale)) };
1606 }
1607
1608 void ContextSetCursorPosition(const ScreenCoordsXY& cursorPosition)
1609 {

Callers 2

WindowZoomSetFunction · 0.85
UpdateHoverIndexMethod · 0.85

Calls 1

ContextGetCursorPositionFunction · 0.85

Tested by

no test coverage detected