English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 03 December 2012, 19:13   #1
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
WinUAE 2.5.0 mouse capturing/pointer skipping issue

I noticed a couple of problems related to the mouse pointer with WinUAE 2.5.0. These issues happen for me both under native Windows Vista and Linux/Wine. The first issue:
  • Start WinUAE and boot a Workbench disk, e.g. Workbench 1.3.
  • Move the mouse pointer to the right, and keep moving it to the right when it reaches the right edge of the Workbench screen. (Pick up the mouse, put it on the left side of the mousemat and continue moving the pointer right, and repeat.)
  • Keep doing that for a while. Eventually the pointer will skip back from the right edge. As you continue to move the mouse right the pointer moves towards the right edge of the Workbench screen, but when it gets there, it skips back to the left again.
The same thing happens with moving the mouse down and the bottom edge. Eventually the pointer skips back up as you continue moving the mouse down. Does that qualify for a "brown paper bag" award?

Another mouse-related issue: If I move the mouse very quickly to the right or down, the pointer becomes un-captured, i.e. the Windows mouse pointer reappears and moves outside the WinUAE window.

Last edited by mark_k; 06 December 2012 at 16:18.
mark_k is offline  
Old 03 December 2012, 19:16   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
Can't duplicate. Last is feature of "magic mouse" option.
Toni Wilen is online now  
Old 03 December 2012, 19:19   #3
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
You have to keep moving the mouse right/down for quite a long time for the pointer to start skipping. Keep going for 30 seconds at least. It happened for me with the default WinUAE settings and booting a normal Workbench disk. Magic Mouse was disabled.

Edit: I was testing under Windows Vista SP2 and Wine. So if there is actually an underlying Windows bug, I guess it might have been fixed in Windows 7?
mark_k is offline  
Old 03 December 2012, 19:24   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
Ok, I can duplicate it too but it also happens under 2.4.1
Toni Wilen is online now  
Old 03 December 2012, 19:29   #5
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
I don't remember whether or not I saw the problem back with version 2.4.1. But if I did, I probably wrote it off as a Wine bug and didn't look into it further.

I actually noticed the pointer-skipping today during normal Workbench use. So even though it seems you have to move the mouse a very long way to trigger it, it can happen eventually in a session without the user purposely moving the pointer for miles and miles.

Edit: Just noticed the pointer-skipping also happens if you keep moving the mouse up or left too.
mark_k is offline  
Old 04 December 2012, 08:16   #6
Coagulus
Gets there in the end...
 
Coagulus's Avatar
 
Join Date: Sep 2005
Location: Wales
Posts: 871
is this related to http://eab.abime.net/showthread.php?t=66451

On that one the mouse gets stuck at the top but that would make sense because when accessing menus at the top the mouse is probably pushed up more than it needs to be eventually causing it. Happens to me all the time and I'm still using 2.4.1 at the mo.

edit - mind you on that link the pointer gets stuck in the middle. I get the pointer doing a similar looking dance at the top of the screen quite often.
Coagulus is offline  
Old 04 December 2012, 12:08   #7
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
I guess that could be the same problem. With the video linked in the other thread, both Amiga and Windows pointers are visible. The Amiga pointer is near the top of the screen, the Windows one keeps getting warped to the middle of the window.

For me, the problem is as if WinUAE is putting the Windows mouse pointer in the middle of a very large invisible/virtual window when emulation starts. Then if the Windows pointer eventually reaches the edge of that large area, both it and the emulated Amiga mouse are skipped back a short distance.

Also, when the Amiga pointer starts skipping you can use the keyboard mouse controls (hold left Amiga and press cursor keys) to move the Amiga pointer elsewhere. If you've been moving the mouse right and the pointer is skipping back at the right side of the Amiga screen, move it using the keys to the left side. As you continue moving the mouse right, the Amiga pointer skips back and forth in a strip on the left side of the Amiga screen. (So the Amiga pointer doesn't need to be at the right side of the Amiga display in order to be skipped back.)
mark_k is offline  
Old 04 December 2012, 12:16   #8
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
Jumping/skipping has nothing to do with "real" Windows mouse position, it is signed 16-bit overflow in internal mouse position calculations that tries to prevent emulated Amiga hardware mouse counter overflows.

Too fast movement in one frame causes annoying mouse jumps, not really possible with standard low DPI real Amiga mouse but PC mouse can be very high DPI.
Toni Wilen is online now  
Old 04 December 2012, 12:44   #9
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
I don't think the speed of mouse movement is the cause of this problem. I just repeated the process described in the first posting in this thread, but made sure to only move the mouse very slowly.

It took at least a couple of minutes of moving the mouse slowly right, but the pointer did eventually start to skip back.
mark_k is offline  
Old 04 December 2012, 13:00   #10
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
I didn't say triggering the bug requires slow or fast mouse. I only said what the code does
Toni Wilen is online now  
Old 04 December 2012, 20:17   #11
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
http://www.winuae.net/files/b/winuae.zip should fix this. (This is not a real beta yet)

Also, possible warning: compiled with MSVC 2012 + update 1. (XP compatibility enabled)
Toni Wilen is online now  
Old 04 December 2012, 20:29   #12
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
Thanks. I couldn't reproduce the skipping pointer issue after a quick test using Wine, so it looks like that's fixed.

The "mouse pointer is sometimes uncaptured if you move the mouse fast enough" issue is still present though.
mark_k is offline  
Old 04 December 2012, 20:38   #13
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
I don't see how mouse can get uncaptured because winuae uses ClipCursor(<window rectangle>) Win32 function. Mouse should not be able to move outside of specified rectangle.

Does it also happen if you switch from "Windows mouse" to rawinput mouse? (Any mouse not named "Windows mouse" is rawinput mouse)
Toni Wilen is online now  
Old 04 December 2012, 21:16   #14
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
Quote:
Originally Posted by Toni Wilen View Post
I don't see how mouse can get uncaptured because winuae uses ClipCursor(<window rectangle>) Win32 function. Mouse should not be able to move outside of specified rectangle.

Does it also happen if you switch from "Windows mouse" to rawinput mouse? (Any mouse not named "Windows mouse" is rawinput mouse)
I tested with Wine and native Windows Vista SP2. It's extremely easy to trigger the un-capturing, I just fling the mouse to the right quickly and it un-captures almost every time.

Wine: no difference between Windows Mouse or "RAW Mouse". As with Vista, I could only un-capture the pointer by moving the mouse right or down.

Vista with both "Windows mouse" and "Microsoft USB Wheel Mouse Optical": The uncapturing still happens. It seems to be much easier to trigger if you move the mouse very fast to the right or down. I couldn't (except for maybe one time) get the pointer to un-capture by moving the mouse quickly up or left. I did notice when moving the mouse fast left or up that the Windows pointer arrow occasionally flashed for a moment outside the emulation window, but the mouse remained captured.

Vista with "Windows mouse": when the pointer gets un-captured the Amiga mouse pointer freezes. Presumably WinUAE no longer receives input events, though the emulation window is still active.

Vista with "Microsoft USB Wheel Mouse Optical": When the pointer gets un-captured, the emulation window remains active. When I move the mouse after it un-captures (so the Windows pointer is outside the emulation window), the Amiga mouse pointer moves as well. So WinUAE continues to receive input events in that case.

Edit: more testing with Vista. I used the -log argument. Each time the mouse uncaptures, WinUAE prints something like this:
Code:
Mouse out of range: 999x331 (680x182 1400x750)
Mouse out of range: 843x306 (680x182 1400x750)
On un-capturing the mouse by moving it down, then back into the window a few times:
Code:
Mouse out of range: 402x624 (360x103 1080x671)
Mouse out of range: 473x590 (360x103 1080x671)
Mouse out of range: 340x602 (360x103 1080x671)
Mouse out of range: 435x593 (360x103 1080x671)
Mouse out of range: 433x585 (360x103 1080x671)
Mouse out of range: 398x600 (360x103 1080x671)
Mouse out of range: 255x592 (360x103 1080x671)
Mouse out of range: 256x588 (360x103 1080x671)
Mouse out of range: 256x586 (360x103 1080x671)
Mouse out of range: 256x583 (360x103 1080x671)
Mouse out of range: 258x578 (360x103 1080x671)
Mouse out of range: 258x575 (360x103 1080x671)
Mouse out of range: 258x574 (360x103 1080x671)
Mouse out of range: 259x573 (360x103 1080x671)
Mouse out of range: 259x572 (360x103 1080x671)
Mouse out of range: 259x571 (360x103 1080x671)
Mouse out of range: 259x569 (360x103 1080x671)
A lot of the out of range messages are printed if I move the mouse pointer slowly back into the WinUAE window, when the pointer would be over the right window border or bottom status bar area.

Last edited by mark_k; 04 December 2012 at 21:28.
mark_k is offline  
Old 05 December 2012, 18:48   #15
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
I can't duplicate uncapturing, I even set my mouse (Logitech G700) to max DPI and moved it as fast as possible, still nothing.

There must be some hidden variable(s).
Toni Wilen is online now  
Old 05 December 2012, 19:56   #16
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
I tested some earlier WinUAE versions and there is no problem with 2.3.0, 2.4.0 and 2.4.1. I'll test some of the 2.5.0 betas and see which one the problem first occurred with.
mark_k is offline  
Old 05 December 2012, 20:04   #17
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
Does it also happen if you boot without startup-sequence and without any config file (a500 quickstart for example) and no default.uae?
Toni Wilen is online now  
Old 05 December 2012, 20:22   #18
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
Yes.

Results of beta-testing:
2.4.2/2.5.0 betas 6, 9, 15, 18, 22, 23: no problem
Beta 24, 27: problem present

So the bug first appeared in 2.5.0 beta 24. The only mouse-related thing in the changelog for that was:
Fixed "Windows mouse" sometimes hitting invisible barriers in windowed mode if window size changed and mouse was captured. (Quite old bug)

With beta 24 I can get the mouse to uncapture by moving it quickly up, down, left or right. And the same applies to 2.5.0 when I just checked again. (I wrote above that I could only get the mouse to uncapture by moving it right or down.)

All testing here was done using Wine. I'll try to test in Vista later.

Update: I confirmed that b23 works fine and b24 has the problem under Vista. I can only get the mouse to uncapture by moving it right or down in Vista. As mentioned above, when I move it left or up sometimes the mouse pointer appears outside the WinUAE window for a moment, but the mouse remains captured.

Last edited by mark_k; 05 December 2012 at 21:12.
mark_k is offline  
Old 05 December 2012, 21:35   #19
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
Include complete log.
Toni Wilen is online now  
Old 05 December 2012, 21:54   #20
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
Attached are logs running WinUAE 2.5.0 (final) under Wine 1.5.18 with -norawinput. I can do the same for Vista later if you think it might help.

Using Quickstart I set DF0: to contain a Workbench 1.3.3 disk, booted then pressed Ctrl-D to interrupt startup-sequence, then moved the mouse to uncapture several times.

You mentioned in another thread about maybe setting up a Vista VM for testing. You can download a preconfigured Vista VM from Microsoft. It's designed for use with MS Virtual PC but maybe it might work in VMWare too? But, given that I'm seeing this problem in both Wine and Vista, maybe it would be unlikely to help much.
Attached Files
File Type: txt winuaebootlog_2500_mouse_problem.txt (11.7 KB, 195 views)
File Type: txt winuaelog_2500_mouse_problem.txt (7.1 KB, 217 views)
mark_k is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Window sizing mouse pointer issue when RTG enabled mark_k support.WinUAE 1 05 February 2013 15:30
Mouse pointer motion smoothness in WinUAE rsn8887 support.WinUAE 12 22 April 2012 12:21
Mouse Pointer Washac support.WinUAE 2 19 February 2012 20:57
Getting a smoother mouse pointer in WB Echo support.WinUAE 3 10 May 2010 18:04
Mouse pointer Washac support.Other 4 12 February 2010 01:38

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 13:35.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09979 seconds with 14 queries