Fixed #75 (Mouse calibration lost in Ready-Set-Go stage)
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@2825 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 433a822118427e345f80ef98e7eee0f03e4d5aa7 Former-commit-id: a3749cfbc1e6c705017ec7fe3c882214a9b622ac
This commit is contained in:
parent
d7ab4a2536
commit
cf3377ec74
2 changed files with 3 additions and 0 deletions
|
@ -549,6 +549,7 @@ common_drive(const int index, tCarElt* car, tSituation *s)
|
|||
{
|
||||
if (HCtx[idx]->mouseControlUsed) {
|
||||
GfuiMouseShow();
|
||||
GfctrlMouseCenter();
|
||||
GfctrlMouseInitCenter();
|
||||
}
|
||||
GfuiKeyEventRegisterCurrent(onKeyAction);
|
||||
|
|
|
@ -394,6 +394,8 @@ tMouseInfo *GfuiMouseInfo(void)
|
|||
void GfuiMouseSetPos(int x, int y)
|
||||
{
|
||||
SDL_WarpMouse(x,y);
|
||||
GfuiMouse.X = (x - (ScrW - ViewW)/2) * (int)GfuiScreen->width / ViewW;
|
||||
GfuiMouse.Y = (ViewH - y + (ScrH - ViewH)/2) * (int)GfuiScreen->height / ViewH;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue