# HG changeset patch # User zipi # Date 1364085212 0 # Node ID 2a3fd4d89ec2a1410b793ae594c61353c562ff18 # Parent 64cef5a0782ae7c86619b40d02c96f6b0f4073f6 Mouse::SetCursorBitmap clean, mouse jump fix diff -r 64cef5a0782a -r 2a3fd4d89ec2 Mouse.cpp --- a/Mouse.cpp Sun Mar 24 00:33:27 2013 +0200 +++ b/Mouse.cpp Sun Mar 24 00:33:32 2013 +0000 @@ -110,12 +110,20 @@ { v10 = 0.0; v5 = 0.0; -LABEL_12: +//LABEL_12: v6 = v5; pAsyncMouse->SetHotspot(v6, v10); - goto LABEL_18; + if ( !pAsyncMouse || (pAsyncMouse->LoadCursor(pName), !pAsyncMouse) ) + { + GetCursorPos(&Point); + SetCursorPos(Point.x, Point.y); + } + return; } - goto LABEL_20; + GetCursorPos(&Point); + ClientToScreen(hWnd,&Point); + SetCursorPos(Point.x, Point.y); + return; } if ( !strcmp(pName, "MICON2") ) { @@ -126,9 +134,16 @@ { v10 = 14.0; v5 = 14.0; - goto LABEL_12; + v6 = v5; + pAsyncMouse->SetHotspot(v6, v10); + if ( !pAsyncMouse || (pAsyncMouse->LoadCursor(pName), !pAsyncMouse) ) + { + GetCursorPos(&Point); + SetCursorPos(Point.x, Point.y); + } + return; } -LABEL_20: +//LABEL_20: GetCursorPos(&Point); SetCursorPos(Point.x, Point.y); return; @@ -138,9 +153,12 @@ v8 = (LONG)LoadCursorA(0, (LPCSTR)IDC_WAIT); SetClassLongA(hWnd, -12, v8); } -LABEL_18: +//LABEL_18: if ( !pAsyncMouse || (pAsyncMouse->LoadCursor(pName), !pAsyncMouse) ) - goto LABEL_20; + { + GetCursorPos(&Point); + SetCursorPos(Point.x, Point.y); + } } // 506128: using guessed type int areWeLoadingTexture;