MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / setMousePos

Method setMousePos

platform/sdl/knativeinputSDL.cpp:149–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149void KNativeInputSDL::setMousePos(int x, int y) {
150#ifdef BOXEDWINE_RECORDER
151 if (Player::instance) {
152 lastX = x;
153 lastY = y;
154 return;
155 }
156#endif
157
158 if (XServer::getServer(true) && XServer::getServer()->fakeFullScreenWnd) {
159 XServer::getServer()->fakeFullScreenWnd->screenToWindow(x, y);
160 }
161 x = xToScreen(x);
162 y = yToScreen(y);
163
164 KNativeSystem::warpMouse(x, y);
165}
166
167int KNativeInputSDL::xToScreen(int x) {
168 return x * (int)scaleX / 100 + (int)scaleXOffset;

Callers 1

x11_WarpPointerFunction · 0.80

Calls 1

screenToWindowMethod · 0.80

Tested by

no test coverage detected