# HG changeset patch # User zipi # Date 1369411123 -3600 # Node ID 6cbf4eb0f953abc880b503137b0b1528aba2b720 # Parent a19cdcaa36fe88966d0738ec63f8a69eee3918c5 Mouse jumps fixed diff -r a19cdcaa36fe -r 6cbf4eb0f953 Mouse.cpp --- a/Mouse.cpp Fri May 24 09:33:38 2013 +0100 +++ b/Mouse.cpp Fri May 24 16:58:43 2013 +0100 @@ -94,46 +94,13 @@ { v3 = LoadCursorA(GetModuleHandleW(nullptr), "Arrow"); SetClassLongA(hWnd, GCL_HCURSOR, (LONG)v3); - /*if (pAsyncMouse) - { - v10 = 0.0; - v5 = 0.0; -//LABEL_12: - v6 = v5; - - GetCursorPos(&Point); - SetCursorPos(Point.x, Point.y); - - return; - }*/ - GetCursorPos(&Point); - ClientToScreen(hWnd,&Point); - SetCursorPos(Point.x, Point.y); - return; } - if ( !strcmp(pName, "MICON2") ) + else if ( !strcmp(pName, "MICON2") ) { v7 = (LONG)LoadCursorA(GetModuleHandleW(nullptr), "Target"); SetClassLongA(hWnd, -12, v7); - /*if (pAsyncMouse) - { - v10 = 14.0; - v5 = 14.0; - v6 = v5; - pAsyncMouse->SetHotspot(v6, v10); - if ( !pAsyncMouse || (pAsyncMouse->LoadCursor(pName), !pAsyncMouse) ) - { - GetCursorPos(&Point); - SetCursorPos(Point.x, Point.y); - } - return; - }*/ -//LABEL_20: - GetCursorPos(&Point); - SetCursorPos(Point.x, Point.y); - return; } - if ( !strcmp(pName, "MICON3") ) + else if ( !strcmp(pName, "MICON3") ) { v8 = (LONG)LoadCursorA(0, (LPCSTR)IDC_WAIT); SetClassLongA(hWnd, -12, v8); @@ -141,6 +108,7 @@ //LABEL_18: GetCursorPos(&Point); + ClientToScreen(hWnd,&Point); SetCursorPos(Point.x, Point.y); } // 506128: using guessed type int areWeLoadingTexture;