| 147 | } |
| 148 | |
| 149 | void 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 | |
| 167 | int KNativeInputSDL::xToScreen(int x) { |
| 168 | return x * (int)scaleX / 100 + (int)scaleXOffset; |
no test coverage detected