[Bug 36873] New: Chronology (.NET 4.0 game) based on 'OpenTK': mouse input non-functional, mouse cursor invisible
wine-bugs at winehq.org
wine-bugs at winehq.org
Tue Jul 8 18:48:08 CDT 2014
https://bugs.winehq.org/show_bug.cgi?id=36873
Bug ID: 36873
Summary: Chronology (.NET 4.0 game) based on 'OpenTK': mouse
input non-functional, mouse cursor invisible
Product: Wine
Version: 1.7.21
Hardware: x86
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: -unknown
Assignee: wine-bugs at winehq.org
Reporter: focht at gmx.net
Hello folks,
the GOG.com version installs .NET Framework 4.0 client profile on its own in
clean 32-bit WINEPREFIX (without Mono).
If the mouse is moved (either in fullscreen or virtual desktop mode), the
console is spammed with:
--- snip ---
fixme:win:GetMouseMovePointsEx (16 0x33ea10 0x33e5cc 64 1) stub
fixme:win:GetMouseMovePointsEx (16 0x33ea10 0x33e5cc 64 1) stub
fixme:win:GetMouseMovePointsEx (16 0x33ea10 0x33e5cc 64 1) stub
--- snip ---
Source:
http://source.winehq.org/git/wine.git/blob/bdc9b147b948b3476815c52f7fc53f4c29494800:/dlls/user32/input.c#l1420
--- snip ---
1427 int WINAPI GetMouseMovePointsEx(UINT size, LPMOUSEMOVEPOINT ptin,
LPMOUSEMOVEPOINT ptout, int count, DWORD res) {
1428
1429 if((size != sizeof(MOUSEMOVEPOINT)) || (count < 0) || (count > 64)) {
1430 SetLastError(ERROR_INVALID_PARAMETER);
1431 return -1;
1432 }
1433
1434 if(!ptin || (!ptout && count)) {
1435 SetLastError(ERROR_NOACCESS);
1436 return -1;
1437 }
1438
1439 FIXME("(%d %p %p %d %d) stub\n", size, ptin, ptout, count, res);
1440
1441 SetLastError(ERROR_POINT_NOT_FOUND);
1442 return -1;
1443 }
--- snip ---
MSDN:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646259%28v=vs.85%29.aspx
That noisy stub (although annoying) doesn't seem to be the problem here.
See here for discussion and how it's implemented in 'OpenTK':
https://github.com/opentk/opentk/issues/76
https://github.com/opentk/opentk/blob/develop/Source/OpenTK/Platform/Windows/WinGLNative.cs#L400
--- snip ---
void HandleMouseMove(IntPtr handle, WindowMessage message, IntPtr
wParam, IntPtr lParam)
{
unsafe
{
Point point = new Point(
(short)((uint)lParam.ToInt32() & 0x0000FFFF),
(short)(((uint)lParam.ToInt32() & 0xFFFF0000) >> 16));
// GetMouseMovePointsEx works with screen coordinates
Point screenPoint = point;
Functions.ClientToScreen(handle, ref screenPoint);
int timestamp = Functions.GetMessageTime();
// & 0xFFFF to handle multiple monitors
http://support.microsoft.com/kb/269743
MouseMovePoint movePoint = new MouseMovePoint()
{
X = screenPoint.X & 0xFFFF,
Y = screenPoint.Y & 0xFFFF,
Time = timestamp,
};
// Max points GetMouseMovePointsEx can return is 64.
const int numPoints = 64;
MouseMovePoint* movePoints = stackalloc
MouseMovePoint[numPoints];
// GetMouseMovePointsEx fills in movePoints so that the most
// recent events are at low indices in the array.
int points = Functions.GetMouseMovePointsEx(
(uint)MouseMovePoint.SizeInBytes,
&movePoint, movePoints, numPoints,
Constants.GMMP_USE_DISPLAY_POINTS);
int lastError = Marshal.GetLastWin32Error();
// No points returned or search point not found
if (points == 0 || (points == -1 && lastError ==
Constants.ERROR_POINT_NOT_FOUND))
{
// Just use the mouse move position
OnMouseMove(point.X, point.Y);
}
else if (points == -1)
{
throw new System.ComponentModel.Win32Exception(lastError);
}
else
{
...
--- snip ---
That information might be still useful for 'GetMouseMovePointsEx'
implementation though.
$ wine --version
wine-1.7.21-75-g0a4c786
Regards
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list